Skip to content
Eugene Lazutkin edited this page Jun 14, 2016 · 1 revision

fromHtml module provides a helper to instantiate DOM fragments from HTML.

fromHtml(html, options)

The function returns a DocumentFragment built from html text snippet meaning that there is no restriction on html to have just one root.

options is a dictionary object, which defines optional properties.

At the moment only one property is understood:

  • document — a document to use for creating DOM nodes. If not specified, document is used.
Clone this wiki locally