diff options
Diffstat (limited to 'src/components/script/dom/htmlaudioelement.rs')
-rw-r--r-- | src/components/script/dom/htmlaudioelement.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/components/script/dom/htmlaudioelement.rs b/src/components/script/dom/htmlaudioelement.rs index 20a36b60749..2b0b86a36f1 100644 --- a/src/components/script/dom/htmlaudioelement.rs +++ b/src/components/script/dom/htmlaudioelement.rs @@ -4,7 +4,7 @@ use dom::bindings::codegen::BindingDeclarations::HTMLAudioElementBinding; use dom::bindings::codegen::InheritTypes::HTMLAudioElementDerived; -use dom::bindings::js::JS; +use dom::bindings::js::{JS, JSRef}; use dom::document::Document; use dom::element::HTMLAudioElementTypeId; use dom::eventtarget::{EventTarget, NodeTargetTypeId}; @@ -33,8 +33,8 @@ impl HTMLAudioElement { } } - pub fn new(localName: DOMString, document: &JS<Document>) -> JS<HTMLAudioElement> { - let element = HTMLAudioElement::new_inherited(localName, document.clone()); + pub fn new(localName: DOMString, document: &JSRef<Document>) -> JS<HTMLAudioElement> { + let element = HTMLAudioElement::new_inherited(localName, document.unrooted()); Node::reflect_node(~element, document, HTMLAudioElementBinding::Wrap) } } |