Fix Element::RemoveAttribute*()

This commit is contained in:
Anthony Ramine 2015-04-03 14:17:26 +02:00
parent c557736d26
commit dd88bcddc4
4 changed files with 31 additions and 25 deletions

View file

@ -207,7 +207,8 @@ impl<'a> HTMLElementCustomAttributeHelpers for JSRef<'a, HTMLElement> {
fn delete_custom_attr(self, name: DOMString) {
let element: JSRef<Element> = ElementCast::from_ref(self);
element.remove_attribute(ns!(""), &to_snake_case(name))
let name = Atom::from_slice(&to_snake_case(name));
element.remove_attribute(&ns!(""), &name);
}
}