mirror of
https://github.com/servo/servo.git
synced 2025-07-22 23:03:42 +01:00
Use #[must_root] for HTMLElements
This commit is contained in:
parent
30014c3919
commit
f5087e1490
70 changed files with 138 additions and 5 deletions
|
@ -19,6 +19,7 @@ use servo_util::atom::Atom;
|
|||
use servo_util::str::DOMString;
|
||||
|
||||
#[deriving(Encodable)]
|
||||
#[must_root]
|
||||
pub struct HTMLInputElement {
|
||||
pub htmlelement: HTMLElement,
|
||||
}
|
||||
|
@ -36,6 +37,7 @@ impl HTMLInputElement {
|
|||
}
|
||||
}
|
||||
|
||||
#[allow(unrooted_must_root)]
|
||||
pub fn new(localName: DOMString, document: &JSRef<Document>) -> Temporary<HTMLInputElement> {
|
||||
let element = HTMLInputElement::new_inherited(localName, document);
|
||||
Node::reflect_node(box element, document, HTMLInputElementBinding::Wrap)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue