mirror of
https://github.com/servo/servo.git
synced 2025-07-22 23:03:42 +01:00
Make Reflector #[must_root], propagate to non-HTMLElements
This commit is contained in:
parent
f0b8391762
commit
30014c3919
40 changed files with 53 additions and 12 deletions
|
@ -17,6 +17,7 @@ use servo_util::str::DOMString;
|
|||
|
||||
/// An HTML comment.
|
||||
#[deriving(Encodable)]
|
||||
#[must_root]
|
||||
pub struct Comment {
|
||||
pub characterdata: CharacterData,
|
||||
}
|
||||
|
@ -35,8 +36,8 @@ impl Comment {
|
|||
}
|
||||
|
||||
pub fn new(text: DOMString, document: &JSRef<Document>) -> Temporary<Comment> {
|
||||
let node = Comment::new_inherited(text, document);
|
||||
Node::reflect_node(box node, document, CommentBinding::Wrap)
|
||||
Node::reflect_node(box Comment::new_inherited(text, document),
|
||||
document, CommentBinding::Wrap)
|
||||
}
|
||||
|
||||
pub fn Constructor(global: &GlobalRef, data: DOMString) -> Fallible<Temporary<Comment>> {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue