mirror of
https://github.com/servo/servo.git
synced 2025-06-24 09:04:33 +01:00
parent
99f24fbd40
commit
742ad9cd24
3 changed files with 29 additions and 1 deletions
|
@ -156,6 +156,10 @@ impl Reflectable for Document {
|
|||
}
|
||||
|
||||
impl Document {
|
||||
pub fn GetDoctype(&self) -> Option<AbstractNode> {
|
||||
self.node.children().find(|child| child.is_doctype())
|
||||
}
|
||||
|
||||
pub fn GetDocumentElement(&self) -> Option<AbstractNode> {
|
||||
self.node.child_elements().next()
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue