Move WebIDL methods to traits implemented by JSRef types.

This commit is contained in:
Josh Matthews 2014-04-10 21:29:54 -04:00
parent dfdda0098a
commit 76783b029e
106 changed files with 3644 additions and 1912 deletions

View file

@ -10,7 +10,7 @@ use dom::characterdata::CharacterData;
use dom::document::Document;
use dom::eventtarget::{EventTarget, NodeTargetTypeId};
use dom::node::{CommentNodeTypeId, Node};
use dom::window::Window;
use dom::window::{Window, WindowMethods};
use servo_util::str::DOMString;
/// An HTML comment.
@ -42,9 +42,10 @@ impl Comment {
pub fn Constructor(owner: &JSRef<Window>, data: DOMString) -> Fallible<Unrooted<Comment>> {
let roots = RootCollection::new();
let document = owner.get().Document();
let document = document.root(&roots);
Ok(Comment::new(data, &document.root_ref()))
let document = owner.Document().root(&roots);
Ok(Comment::new(data, &*document))
}
}
pub trait CommentMethods {
}