diff options
Diffstat (limited to 'components/script/dom/documentfragment.rs')
-rw-r--r-- | components/script/dom/documentfragment.rs | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/components/script/dom/documentfragment.rs b/components/script/dom/documentfragment.rs index a1cd8f44e13..5c8165c06a7 100644 --- a/components/script/dom/documentfragment.rs +++ b/components/script/dom/documentfragment.rs @@ -40,18 +40,20 @@ impl DocumentFragment { } } - pub fn new(document: &Document) -> DomRoot<DocumentFragment> { - Self::new_with_proto(document, None) + pub fn new(document: &Document, can_gc: CanGc) -> DomRoot<DocumentFragment> { + Self::new_with_proto(document, None, can_gc) } fn new_with_proto( document: &Document, proto: Option<HandleObject>, + can_gc: CanGc, ) -> DomRoot<DocumentFragment> { Node::reflect_node_with_proto( Box::new(DocumentFragment::new_inherited(document)), document, proto, + can_gc, ) } @@ -65,11 +67,11 @@ impl DocumentFragmentMethods for DocumentFragment { fn Constructor( window: &Window, proto: Option<HandleObject>, - _can_gc: CanGc, + can_gc: CanGc, ) -> Fallible<DomRoot<DocumentFragment>> { let document = window.Document(); - Ok(DocumentFragment::new_with_proto(&document, proto)) + Ok(DocumentFragment::new_with_proto(&document, proto, can_gc)) } // https://dom.spec.whatwg.org/#dom-parentnode-children @@ -106,18 +108,18 @@ impl DocumentFragmentMethods for DocumentFragment { } // https://dom.spec.whatwg.org/#dom-parentnode-prepend - fn Prepend(&self, nodes: Vec<NodeOrString>) -> ErrorResult { - self.upcast::<Node>().prepend(nodes) + fn Prepend(&self, nodes: Vec<NodeOrString>, can_gc: CanGc) -> ErrorResult { + self.upcast::<Node>().prepend(nodes, can_gc) } // https://dom.spec.whatwg.org/#dom-parentnode-append - fn Append(&self, nodes: Vec<NodeOrString>) -> ErrorResult { - self.upcast::<Node>().append(nodes) + fn Append(&self, nodes: Vec<NodeOrString>, can_gc: CanGc) -> ErrorResult { + self.upcast::<Node>().append(nodes, can_gc) } // https://dom.spec.whatwg.org/#dom-parentnode-replacechildren - fn ReplaceChildren(&self, nodes: Vec<NodeOrString>) -> ErrorResult { - self.upcast::<Node>().replace_children(nodes) + fn ReplaceChildren(&self, nodes: Vec<NodeOrString>, can_gc: CanGc) -> ErrorResult { + self.upcast::<Node>().replace_children(nodes, can_gc) } // https://dom.spec.whatwg.org/#dom-parentnode-queryselector |