Usage
Typescript Import Format
//This namespace exports multiple static methods or members. To import
import * as HtmlUtils from "ojs/ojhtmlutils";
//Now you can access the methods as HtmlUtils.methodName and so on
For additional information visit:
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>