mirror of
https://github.com/servo/servo.git
synced 2025-06-20 15:18:58 +01:00
Move is_root() into AbstractNode
This commit is contained in:
parent
ae79f5351d
commit
a9a5e90787
2 changed files with 6 additions and 7 deletions
|
@ -264,6 +264,11 @@ impl<'self, View> AbstractNode<View> {
|
|||
self.with_base(|b| b.next_sibling)
|
||||
}
|
||||
|
||||
/// Is this node a root?
|
||||
pub fn is_root(self) -> bool {
|
||||
self.parent_node().is_none()
|
||||
}
|
||||
|
||||
//
|
||||
// Downcasting borrows
|
||||
//
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue