diff options
Diffstat (limited to 'components/script/dom/element.rs')
-rw-r--r-- | components/script/dom/element.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/components/script/dom/element.rs b/components/script/dom/element.rs index a81c515aef8..ca1ac321b57 100644 --- a/components/script/dom/element.rs +++ b/components/script/dom/element.rs @@ -509,7 +509,7 @@ impl<'a> AttributeHandlers for JSRef<'a, Element> { value: DOMString) -> AttrValue { if *namespace == ns!("") { vtable_for(&NodeCast::from_ref(self)) - .parse_plain_attribute(local_name.as_slice(), value) + .parse_plain_attribute(local_name, value) } else { StringAttrValue(value) } @@ -1037,10 +1037,10 @@ impl<'a> VirtualMethods for JSRef<'a, Element> { self.notify_content_changed(); } - fn parse_plain_attribute(&self, name: &str, value: DOMString) -> AttrValue { + fn parse_plain_attribute(&self, name: &Atom, value: DOMString) -> AttrValue { match name { - "id" => AttrValue::from_atomic(value), - "class" => AttrValue::from_tokenlist(value), + &atom!("id") => AttrValue::from_atomic(value), + &atom!("class") => AttrValue::from_tokenlist(value), _ => self.super_type().unwrap().parse_plain_attribute(name, value), } } |