Use HTMLHtmlElement::new in parse_html.

This commit is contained in:
Ms2ger 2013-11-02 20:45:22 +01:00
parent e918d4daf0
commit 4ac0dc1bfd

View file

@ -333,8 +333,7 @@ pub fn parse_html(cx: *JSContext,
}
// Build the root node.
let root = @HTMLHtmlElement { htmlelement: HTMLElement::new(HTMLHtmlElementTypeId, ~"html", document) };
let root = unsafe { Node::as_abstract_node(cx, root) };
let root = HTMLHtmlElement::new(~"html", document);
debug!("created new node");
let mut parser = hubbub::Parser("UTF-8", false);
debug!("created parser");