mirror of
https://github.com/servo/servo
synced 2026-04-28 02:19:14 +02:00
Use #[must_root] for HTMLElements
This commit is contained in:
@@ -42,6 +42,7 @@ enum SandboxAllowance {
|
||||
}
|
||||
|
||||
#[deriving(Encodable)]
|
||||
#[must_root]
|
||||
pub struct HTMLIFrameElement {
|
||||
pub htmlelement: HTMLElement,
|
||||
pub size: Traceable<Cell<Option<IFrameSize>>>,
|
||||
@@ -117,6 +118,7 @@ impl HTMLIFrameElement {
|
||||
}
|
||||
}
|
||||
|
||||
#[allow(unrooted_must_root)]
|
||||
pub fn new(localName: DOMString, document: &JSRef<Document>) -> Temporary<HTMLIFrameElement> {
|
||||
let element = HTMLIFrameElement::new_inherited(localName, document);
|
||||
Node::reflect_node(box element, document, HTMLIFrameElementBinding::Wrap)
|
||||
|
||||
Reference in New Issue
Block a user