Implement Element.localName.(fixes #2188)

This commit is contained in:
lpy 2014-04-23 11:00:03 +08:00
parent c6bdc7b7f2
commit dfe5215b88
10 changed files with 32 additions and 28 deletions

View file

@ -76,7 +76,7 @@ impl HTMLFieldSetElement {
static tag_names: StaticStringVec = &["button", "fieldset", "input",
"keygen", "object", "output", "select", "textarea"];
let root: &JS<Element> = &ElementCast::to(root).unwrap();
elem != root && tag_names.iter().any(|&tag_name| tag_name == elem.get().tag_name)
elem != root && tag_names.iter().any(|&tag_name| tag_name == elem.get().local_name)
}
}
let node: JS<Node> = NodeCast::from(abstract_self);