mirror of
https://github.com/servo/servo.git
synced 2025-06-06 16:45:39 +00:00
Use #[must_root] for HTMLElements
This commit is contained in:
parent
30014c3919
commit
f5087e1490
70 changed files with 138 additions and 5 deletions
|
@ -14,6 +14,7 @@ use dom::node::{Node, ElementNodeTypeId};
|
|||
use servo_util::str::DOMString;
|
||||
|
||||
#[deriving(Encodable)]
|
||||
#[must_root]
|
||||
pub struct HTMLTrackElement {
|
||||
pub htmlelement: HTMLElement,
|
||||
}
|
||||
|
@ -31,6 +32,7 @@ impl HTMLTrackElement {
|
|||
}
|
||||
}
|
||||
|
||||
#[allow(unrooted_must_root)]
|
||||
pub fn new(localName: DOMString, document: &JSRef<Document>) -> Temporary<HTMLTrackElement> {
|
||||
let element = HTMLTrackElement::new_inherited(localName, document);
|
||||
Node::reflect_node(box element, document, HTMLTrackElementBinding::Wrap)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue