Implement Node::rootNode

This commit is contained in:
Léo Stefanesco 2016-04-20 18:38:12 +02:00
parent 89b276c889
commit 00b3f7930e
4 changed files with 7 additions and 66 deletions

View file

@ -1858,6 +1858,11 @@ impl NodeMethods for Node {
}
}
// https://dom.spec.whatwg.org/#dom-node-rootnode
fn RootNode(&self) -> Root<Node> {
self.inclusive_ancestors().last().unwrap()
}
// https://dom.spec.whatwg.org/#dom-node-parentnode
fn GetParentNode(&self) -> Option<Root<Node>> {
self.parent_node.get()