diff options
author | Manish Goregaokar <manishsmail@gmail.com> | 2014-09-17 00:51:20 +0530 |
---|---|---|
committer | Manish Goregaokar <manishsmail@gmail.com> | 2014-09-17 01:02:41 +0530 |
commit | 30014c3919f5ad30d491074dafbfdaad0fb0de92 (patch) | |
tree | 12c75bb55e42abff8cceaeaf6b3d28c497f45102 /components/script/dom/documentfragment.rs | |
parent | f0b8391762f37a6e50dfb7a46b461fc8f9414d57 (diff) | |
download | servo-30014c3919f5ad30d491074dafbfdaad0fb0de92.tar.gz servo-30014c3919f5ad30d491074dafbfdaad0fb0de92.zip |
Make Reflector #[must_root], propagate to non-HTMLElements
Diffstat (limited to 'components/script/dom/documentfragment.rs')
-rw-r--r-- | components/script/dom/documentfragment.rs | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/components/script/dom/documentfragment.rs b/components/script/dom/documentfragment.rs index 1f3fcb29424..c8d8b961113 100644 --- a/components/script/dom/documentfragment.rs +++ b/components/script/dom/documentfragment.rs @@ -19,6 +19,7 @@ use dom::nodelist::NodeList; use servo_util::str::DOMString; #[deriving(Encodable)] +#[must_root] pub struct DocumentFragment { pub node: Node, } @@ -38,8 +39,8 @@ impl DocumentFragment { } pub fn new(document: &JSRef<Document>) -> Temporary<DocumentFragment> { - let node = DocumentFragment::new_inherited(document); - Node::reflect_node(box node, document, DocumentFragmentBinding::Wrap) + Node::reflect_node(box DocumentFragment::new_inherited(document), + document, DocumentFragmentBinding::Wrap) } pub fn Constructor(global: &GlobalRef) -> Fallible<Temporary<DocumentFragment>> { |