Make Document a Node.

This commit is contained in:
Josh Matthews 2013-10-17 16:42:51 +01:00
parent cc76a2188e
commit 99a36cbeb6
10 changed files with 96 additions and 120 deletions

View file

@ -35,6 +35,10 @@ impl ReflectableDocument for HTMLDocument {
fn init_reflector(@mut self, cx: *JSContext) {
self.wrap_object_shared(cx, ptr::null()); //XXXjdm a proper scope would be nice
}
fn init_node(@mut self, doc: AbstractDocument) {
self.parent.node.set_owner_doc(doc);
}
}
impl HTMLDocument {