pub fn from_html(html: &str) -> Result<Node, SyntaxError> {
        js_try!(
            var span = document.createElement("span");
            span.innerHTML = @{html};
            if( span.childNodes.length != 1 ) {
                throw new DOMException(
                    "Node::from_html requires a single root node but has: "
                    + span.childNodes.length,
                    "SyntaxError");
            }
            return span.childNodes[0];
        ).unwrap()
    }
/// Attempt to create the `Node` from raw html. The html string must contain **exactly one**
/// root node.
///
/// Returns a `SyntaxError` if:
///
/// - There is not **exactly one** root node.
/// - The html syntax is wrong. However, on most browsers the html parsing algorighm is
///   _unbelievably_ forgiving and will just turn your html into text or maybe even an empty
///   string.
///
/// It is recommended to have control over the html being given to this function as not
/// having control is a security concern.
///
/// For more details, see information about setting `innerHTML`:
///
/// <https://developer.mozilla.org/en-US/docs/Web/API/Element/innerHTML>
Attempt to create the `Node` from raw html. The html string must contain **exactly one
root node.

Returns a `SyntaxError` if.

There is not **exactly one** root node.
The html syntax is wrong. However, on most browsers the html parsing algorighm is
_unbelievably_ forgiving and will just turn your html into text or maybe even an empty
string.

It is recommended to have control over the html being given to this function as not
having control is a security concern.

For more details, see information about setting `innerHTML`.


Attempt to create the ` Node ` from raw html . The html string must contain ** exactly one root node . Returns a ` SyntaxError ` if . There is not ** exactly one ** root node . The html syntax is wrong . However on most browsers the html parsing algorighm is _unbelievably_ forgiving and will just turn your html into text or maybe even an empty string . It is recommended to have control over the html being given to this function as not having control is a security concern . For more details see information about setting ` innerHTML ` .
pub fn from_html(html: &str) -> Result<Node, SyntaxError> {
        js_try!(
            var span = document.createElement("span");
            span.innerHTML = @{html};
            if( span.childNodes.length != 1 ) {
                throw new DOMException(
                    "Node::from_html requires a single root node but has: "
                    + span.childNodes.length,
                    "SyntaxError");
            }
            return span.childNodes[0];
        ).unwrap()
    }
pub fn from_html ( html : & str ) -> Result < Node , SyntaxError > { js_try ! ( var span document createElement ( " " ) span innerHTML { html } if ( span childNodes length 1 ) { throw new DOMException ( " " span childNodes length " " ) } return span childNodes [ 0 ] ) . unwrap ( ) }
Attempt to create the `Node` from raw html.
Attempt to create the ` Node ` from raw html .
html
&str
html
&str