aboutsummaryrefslogtreecommitdiffstats
path: root/src/components/script/dom/node.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/components/script/dom/node.rs')
-rw-r--r--src/components/script/dom/node.rs10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/components/script/dom/node.rs b/src/components/script/dom/node.rs
index 83deddcaf50..78533b2b48c 100644
--- a/src/components/script/dom/node.rs
+++ b/src/components/script/dom/node.rs
@@ -441,9 +441,7 @@ impl<'self, View> AbstractNode<View> {
}
pub fn children(&self) -> AbstractNodeChildrenIterator<View> {
- AbstractNodeChildrenIterator {
- current_node: self.first_child(),
- }
+ self.node().children()
}
// Issue #1030: should not walk the tree
@@ -498,6 +496,12 @@ impl<View> Node<View> {
pub fn set_owner_doc(&mut self, document: AbstractDocument) {
self.owner_doc = Some(document);
}
+
+ pub fn children(&self) -> AbstractNodeChildrenIterator<View> {
+ AbstractNodeChildrenIterator {
+ current_node: self.first_child,
+ }
+ }
}
impl Node<ScriptView> {