Namespace: HtmlUtils

Oracle® JavaScript Extension Toolkit (JET)
7.1.0

F18183-01

QuickNav


PREVIEW: This is a preview API. Preview APIs are production quality, but can be changed on a major version without a deprecation path.

HtmlUtils

Version:
  • 7.1.0
Since:
  • 6.1.0
Module:
  • ojhtmlutils

Module usage

See JET Module Loading for an overview of module usage within JET.

Javascript Import Format
define(['ojs/ojhtmlutils'], function(HtmlUtils) {
 // Application should call API on HtmlUtils 
})
Typescript Import Format
//This namespace exports multiple static methods or members. To import 
import * as HtmlUtils from "ojhtmlutils";

//Now you can access the methods as HtmlUtils.methodName and so on

JET In Typescript

A detailed description of working with JET elements and classes in your typescript project can be found at: JET Typescript Usage.

Utility class with functions for preprocessing HTML content.

Methods

(static) .getTemplateContent(node) → {Array.<Node>}

Utility that will clone the content of a template node and return an array of DOM Nodes.
Parameters:
Name Type Description
node Node The template node to retrieve the content for.
Returns:
Type
Array.<Node>

(static) .stringToNodeArray(html) → {Array.<Node>}

Utility that will parse an HTML string into an array of DOM Nodes.
Parameters:
Name Type Description
html string The HTML string to parse.
Returns:
Type
Array.<Node>