Namespace: arbutus

arbutus

The root namespace for the Arbutus library.

Source:
  • maria.js, line 957

Methods

<static> parseHTML(html, doc) → {DocumentFragment}

The html string will be trimmed.

Returns a document fragment that has the children defined by the html string.

var fragment = arbutus.parseHTML('<p>alpha beta</p>');
document.body.appendChild(fragment);

Note that a call to this function is relatively expensive and you probably don't want to have a loop of thousands with calls to this function.

Parameters:
Name Type Argument Description
html string

The string of HTML to be parsed.

doc Document <optional>

The document object to create the new DOM nodes.

Source:
  • maria.js, line 1035
Returns:
Type
DocumentFragment