mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
Implement Node::rootNode
This commit is contained in:
parent
89b276c889
commit
00b3f7930e
4 changed files with 7 additions and 66 deletions
|
@ -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()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue