diff options
author | Josh Matthews <josh@joshmatthews.net> | 2013-10-17 16:42:51 +0100 |
---|---|---|
committer | Josh Matthews <josh@joshmatthews.net> | 2013-10-24 18:07:46 +0200 |
commit | 4e47d59165d186d0938fe9ffd726b2c1b83d50f4 (patch) | |
tree | 20159443d4afcc00b75ab0b34766d77fbc0021a6 /src/components/script/dom/htmldocument.rs | |
parent | b1c068b2034b8df2fab4a0943273c5a59bf759ed (diff) | |
download | servo-4e47d59165d186d0938fe9ffd726b2c1b83d50f4.tar.gz servo-4e47d59165d186d0938fe9ffd726b2c1b83d50f4.zip |
Make Document a Node.
Diffstat (limited to 'src/components/script/dom/htmldocument.rs')
-rw-r--r-- | src/components/script/dom/htmldocument.rs | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/components/script/dom/htmldocument.rs b/src/components/script/dom/htmldocument.rs index cadba01ce97..d4ac4fa0e52 100644 --- a/src/components/script/dom/htmldocument.rs +++ b/src/components/script/dom/htmldocument.rs @@ -35,6 +35,11 @@ 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); + self.parent.node.add_to_doc(AbstractNode::from_document(doc), doc); + } } impl HTMLDocument { |