Fix useless assert in script::dom::element

We should ensure the parameter is lowercased. Right now, the assert will
always return true.

Discussed in #5445

Introduced in ee2ccc4f87
This commit is contained in:
Corey Farwell 2015-03-29 17:54:01 -04:00
parent 0fd41847a3
commit ae9b1636b1

View file

@ -798,7 +798,7 @@ impl<'a> AttributeHandlers for JSRef<'a, Element> {
}
fn set_atomic_attribute(self, name: &Atom, value: DOMString) {
assert!(name.eq_ignore_ascii_case(name));
assert!(name.as_slice() == name.to_ascii_lowercase());
let value = AttrValue::from_atomic(value);
self.set_attribute(name, value);
}