aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/htmlbuttonelement.rs
diff options
context:
space:
mode:
authorManish Goregaokar <manishsmail@gmail.com>2014-09-17 01:00:59 +0530
committerManish Goregaokar <manishsmail@gmail.com>2014-09-17 01:02:44 +0530
commitf5087e149004e0080a61a2a31d76a5c52ee357e1 (patch)
tree6e9507a3e4e8ce3c84ab603673d3eead9ae0d1b0 /components/script/dom/htmlbuttonelement.rs
parent30014c3919f5ad30d491074dafbfdaad0fb0de92 (diff)
downloadservo-f5087e149004e0080a61a2a31d76a5c52ee357e1.tar.gz
servo-f5087e149004e0080a61a2a31d76a5c52ee357e1.zip
Use #[must_root] for HTMLElements
Diffstat (limited to 'components/script/dom/htmlbuttonelement.rs')
-rw-r--r--components/script/dom/htmlbuttonelement.rs2
1 files changed, 2 insertions, 0 deletions
diff --git a/components/script/dom/htmlbuttonelement.rs b/components/script/dom/htmlbuttonelement.rs
index 0c8903603e1..91a8de46617 100644
--- a/components/script/dom/htmlbuttonelement.rs
+++ b/components/script/dom/htmlbuttonelement.rs
@@ -20,6 +20,7 @@ use servo_util::atom::Atom;
use servo_util::str::DOMString;
#[deriving(Encodable)]
+#[must_root]
pub struct HTMLButtonElement {
pub htmlelement: HTMLElement
}
@@ -37,6 +38,7 @@ impl HTMLButtonElement {
}
}
+ #[allow(unrooted_must_root)]
pub fn new(localName: DOMString, document: &JSRef<Document>) -> Temporary<HTMLButtonElement> {
let element = HTMLButtonElement::new_inherited(localName, document);
Node::reflect_node(box element, document, HTMLButtonElementBinding::Wrap)