mirror of
https://github.com/servo/servo.git
synced 2025-08-05 05:30:08 +01:00
Make Document a Node.
This commit is contained in:
parent
b1c068b203
commit
4e47d59165
10 changed files with 94 additions and 96 deletions
|
@ -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),
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue