Use #[must_root] for HTMLElements

This commit is contained in:
Manish Goregaokar 2014-09-17 01:00:59 +05:30
parent 30014c3919
commit f5087e1490
70 changed files with 138 additions and 5 deletions

View file

@ -36,8 +36,8 @@ impl Text {
}
pub fn new(text: DOMString, document: &JSRef<Document>) -> Temporary<Text> {
let node = Text::new_inherited(text, document);
Node::reflect_node(box node, document, TextBinding::Wrap)
Node::reflect_node(box Text::new_inherited(text, document),
document, TextBinding::Wrap)
}
pub fn Constructor(global: &GlobalRef, text: DOMString) -> Fallible<Temporary<Text>> {