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:
@@ -27,6 +27,7 @@ use servo_util::str::DOMString;
|
||||
use url::Url;
|
||||
|
||||
#[deriving(Encodable)]
|
||||
#[must_root]
|
||||
pub struct HTMLObjectElement {
|
||||
pub htmlelement: HTMLElement,
|
||||
}
|
||||
@@ -44,6 +45,7 @@ impl HTMLObjectElement {
|
||||
}
|
||||
}
|
||||
|
||||
#[allow(unrooted_must_root)]
|
||||
pub fn new(localName: DOMString, document: &JSRef<Document>) -> Temporary<HTMLObjectElement> {
|
||||
let element = HTMLObjectElement::new_inherited(localName, document);
|
||||
Node::reflect_node(box element, document, HTMLObjectElementBinding::Wrap)
|
||||
|
||||
Reference in New Issue
Block a user