diff options
-rw-r--r-- | components/script/dom/node.rs | 3 | ||||
-rw-r--r-- | components/script/dom/virtualmethods.rs | 2 |
2 files changed, 3 insertions, 2 deletions
diff --git a/components/script/dom/node.rs b/components/script/dom/node.rs index 9340e716a5d..5f44a0df67c 100644 --- a/components/script/dom/node.rs +++ b/components/script/dom/node.rs @@ -1556,9 +1556,8 @@ impl Node { let old_previous_sibling = node.GetPreviousSibling(); // Step 8. let old_next_sibling = node.GetNextSibling(); - // Step 9. + // Steps 9-10 are handled in unbind_from_tree. parent.remove_child(node, cached_index); - // Step 10. removing steps (https://dom.spec.whatwg.org/#concept-node-remove-ext) // Step 11. transient registered observers // Step 12. if let SuppressObserver::Unsuppressed = suppress_observers { diff --git a/components/script/dom/virtualmethods.rs b/components/script/dom/virtualmethods.rs index 2e8391671a8..e3def582ae4 100644 --- a/components/script/dom/virtualmethods.rs +++ b/components/script/dom/virtualmethods.rs @@ -83,6 +83,8 @@ pub trait VirtualMethods { /// Called when a Node is removed from a tree, where 'tree_in_doc' /// indicates whether the tree is part of a Document. + /// Implements removing steps: + /// https://dom.spec.whatwg.org/#concept-node-remove-ext fn unbind_from_tree(&self, context: &UnbindContext) { if let Some(ref s) = self.super_type() { s.unbind_from_tree(context); |