aboutsummaryrefslogtreecommitdiffstats
path: root/src/components/script/dom/bindings/node.rs
diff options
context:
space:
mode:
authorJosh Matthews <josh@joshmatthews.net>2013-10-17 16:42:51 +0100
committerJosh Matthews <josh@joshmatthews.net>2013-10-24 18:07:46 +0200
commit4e47d59165d186d0938fe9ffd726b2c1b83d50f4 (patch)
tree20159443d4afcc00b75ab0b34766d77fbc0021a6 /src/components/script/dom/bindings/node.rs
parentb1c068b2034b8df2fab4a0943273c5a59bf759ed (diff)
downloadservo-4e47d59165d186d0938fe9ffd726b2c1b83d50f4.tar.gz
servo-4e47d59165d186d0938fe9ffd726b2c1b83d50f4.zip
Make Document a Node.
Diffstat (limited to 'src/components/script/dom/bindings/node.rs')
-rw-r--r--src/components/script/dom/bindings/node.rs5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/components/script/dom/bindings/node.rs b/src/components/script/dom/bindings/node.rs
index 5adf545f14c..e2d10ec6387 100644
--- a/src/components/script/dom/bindings/node.rs
+++ b/src/components/script/dom/bindings/node.rs
@@ -3,10 +3,11 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
use dom::bindings::utils::{Reflectable, Reflector, Traceable};
+use dom::document::{PlainDocumentTypeId, HTMLDocumentTypeId};
use dom::element::*;
use dom::types::*;
use dom::node::{AbstractNode, ElementNodeTypeId, TextNodeTypeId, CommentNodeTypeId};
-use dom::node::{DoctypeNodeTypeId, DocumentFragmentNodeTypeId, ScriptView};
+use dom::node::{DoctypeNodeTypeId, DocumentFragmentNodeTypeId, ScriptView, DocumentNodeTypeId};
use std::cast;
use std::libc;
@@ -95,6 +96,8 @@ pub fn create(cx: *JSContext, node: &mut AbstractNode<ScriptView>) -> *JSObject
CommentNodeTypeId => generate_element!(Comment),
DoctypeNodeTypeId => generate_element!(DocumentType),
DocumentFragmentNodeTypeId => generate_element!(DocumentFragment),
+ DocumentNodeTypeId(PlainDocumentTypeId) => generate_element!(Document),
+ DocumentNodeTypeId(HTMLDocumentTypeId) => generate_element!(HTMLDocument),
TextNodeTypeId => generate_element!(Text),
}
}