mirror of
https://github.com/servo/servo.git
synced 2025-06-21 07:38:59 +01:00
implemented iterator for child elements
This commit is contained in:
parent
be8ed32562
commit
8bb1724c1e
2 changed files with 20 additions and 7 deletions
|
@ -162,9 +162,7 @@ impl Reflectable for Document {
|
|||
|
||||
impl Document {
|
||||
pub fn GetDocumentElement(&self) -> Option<AbstractNode> {
|
||||
do self.node.children().find |c| {
|
||||
c.is_element()
|
||||
}
|
||||
self.node.child_elements().next()
|
||||
}
|
||||
|
||||
fn get_cx(&self) -> *JSContext {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue