mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
Use Temporary in ChildElementIterator
This commit is contained in:
parent
bf7c791e3a
commit
11b4ff9e94
2 changed files with 11 additions and 14 deletions
|
@ -927,7 +927,7 @@ impl<'a> DocumentMethods for JSRef<'a, Document> {
|
|||
// http://dom.spec.whatwg.org/#dom-document-documentelement
|
||||
fn GetDocumentElement(self) -> Option<Temporary<Element>> {
|
||||
let node: JSRef<Node> = NodeCast::from_ref(self);
|
||||
node.child_elements().next().map(Temporary::from_rooted)
|
||||
node.child_elements().next()
|
||||
}
|
||||
|
||||
// http://dom.spec.whatwg.org/#dom-document-getelementsbytagname
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue