mirror of
https://github.com/servo/servo
synced 2026-04-27 18:07:52 +02:00
Use #[must_root] for HTMLElements
This commit is contained in:
@@ -14,6 +14,7 @@ use dom::node::{Node, ElementNodeTypeId};
|
||||
use servo_util::str::DOMString;
|
||||
|
||||
#[deriving(Encodable)]
|
||||
#[must_root]
|
||||
pub struct HTMLBaseElement {
|
||||
pub htmlelement: HTMLElement
|
||||
}
|
||||
@@ -31,6 +32,7 @@ impl HTMLBaseElement {
|
||||
}
|
||||
}
|
||||
|
||||
#[allow(unrooted_must_root)]
|
||||
pub fn new(localName: DOMString, document: &JSRef<Document>) -> Temporary<HTMLBaseElement> {
|
||||
let element = HTMLBaseElement::new_inherited(localName, document);
|
||||
Node::reflect_node(box element, document, HTMLBaseElementBinding::Wrap)
|
||||
|
||||
Reference in New Issue
Block a user