mirror of
https://github.com/servo/servo.git
synced 2025-08-04 13:10:20 +01:00
Move all methods on T to JSRef<T> or JS<T> as appropriate.
This commit is contained in:
parent
7daa97c7e5
commit
109410900c
15 changed files with 574 additions and 521 deletions
|
@ -11,7 +11,7 @@ use dom::element::{Element, HTMLFormElementTypeId};
|
|||
use dom::eventtarget::{EventTarget, NodeTargetTypeId};
|
||||
use dom::htmlcollection::{HTMLCollection, Static};
|
||||
use dom::htmlelement::HTMLElement;
|
||||
use dom::node::{Node, ElementNodeTypeId};
|
||||
use dom::node::{Node, ElementNodeTypeId, window_from_node};
|
||||
use servo_util::str::DOMString;
|
||||
|
||||
#[deriving(Encodable)]
|
||||
|
@ -144,8 +144,7 @@ impl<'a> HTMLFormElementMethods for JSRef<'a, HTMLFormElement> {
|
|||
fn Elements(&self) -> Unrooted<HTMLCollection> {
|
||||
// FIXME: https://github.com/mozilla/servo/issues/1844
|
||||
let roots = RootCollection::new();
|
||||
let doc = self.htmlelement.element.node.owner_doc().root(&roots);
|
||||
let window = doc.deref().window.root(&roots);
|
||||
let window = window_from_node(self).root(&roots);
|
||||
HTMLCollection::new(&*window, Static(vec!()))
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue