diff options
Diffstat (limited to 'components/script/dom/htmlscriptelement.rs')
-rw-r--r-- | components/script/dom/htmlscriptelement.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/components/script/dom/htmlscriptelement.rs b/components/script/dom/htmlscriptelement.rs index d16fc56d72f..d733cbb45ea 100644 --- a/components/script/dom/htmlscriptelement.rs +++ b/components/script/dom/htmlscriptelement.rs @@ -48,7 +48,7 @@ impl HTMLScriptElement { pub trait HTMLScriptElementHelpers { /// Prepare a script (<http://www.whatwg.org/html/#prepare-a-script>), /// steps 6 and 7. - fn is_javascript(&self) -> bool; + fn is_javascript(self) -> bool; } /// Supported script types as defined by @@ -73,8 +73,8 @@ static SCRIPT_JS_MIMES: StaticStringVec = &[ ]; impl<'a> HTMLScriptElementHelpers for JSRef<'a, HTMLScriptElement> { - fn is_javascript(&self) -> bool { - let element: JSRef<Element> = ElementCast::from_ref(*self); + fn is_javascript(self) -> bool { + let element: JSRef<Element> = ElementCast::from_ref(self); match element.get_attribute(Null, "type").root().map(|s| s.Value()) { Some(ref s) if s.is_empty() => { // type attr exists, but empty means js |