Parses an element from the given HTML fragment string.
Use up.hello() to activate JavaScript behavior within the created element.
element = up.element.createFromHTML('<div class="foo"><span>text</span></div>')
element.className // returns 'foo'
element.children[0] // returns <span> element
element.children[0].textContent // returns 'text'
A string of HTML from which to create the element.
The given HTML must have a single tag at its root or an error is thrown.
The root element of the parsed DOM tree.
Tip Your coding agent can search these docs locally with the Unpoly agent skill