diff options
Diffstat (limited to 'components/script/dom/htmlobjectelement.rs')
-rw-r--r-- | components/script/dom/htmlobjectelement.rs | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/components/script/dom/htmlobjectelement.rs b/components/script/dom/htmlobjectelement.rs index 4e4789ea3cc..18fad7a0fcc 100644 --- a/components/script/dom/htmlobjectelement.rs +++ b/components/script/dom/htmlobjectelement.rs @@ -2,6 +2,8 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ +use dom::attr::Attr; +use dom::attr::AttrHelpers; use dom::bindings::codegen::Bindings::AttrBinding::AttrMethods; use dom::bindings::codegen::Bindings::HTMLObjectElementBinding; use dom::bindings::codegen::Bindings::HTMLObjectElementBinding::HTMLObjectElementMethods; @@ -99,15 +101,18 @@ impl<'a> VirtualMethods for JSRef<'a, HTMLObjectElement> { Some(htmlelement as &VirtualMethods) } - fn after_set_attr(&self, name: &Atom, value: DOMString) { + fn after_set_attr(&self, attr: JSRef<Attr>) { match self.super_type() { - Some(ref s) => s.after_set_attr(name, value), - _ => (), + Some(ref s) => s.after_set_attr(attr), + _ => () } - if "data" == name.as_slice() { - let window = window_from_node(*self).root(); - self.process_data_url(window.image_cache_task().clone()); + match attr.local_name() { + &atom!("data") => { + let window = window_from_node(*self).root(); + self.process_data_url(window.image_cache_task().clone()); + }, + _ => () } } } |