-- Simon Pieters
For HTML elements in HTML documents, why is Element.localName uppercased
for tag names and lowercased for attribute names? I wouldn't expect it to,
and it makes it harder to write scripts that work for both HTML and XHTML.
For example, if you want a script to work in both legacy HTML UAs and
HTML5 UAs as well as in XHTML, you may want to do something like if
((elm.tagName == "A" && !elm.namespaceURI) || (elm.localName == "a" &&
elm.namespaceURI == "http://www.w3.org/1999/xhtml")) to check that a given
element is an HTML "a" element.
- [whatwg] .localName shouldn't change case Simon Pieters
- Re: [whatwg] .localName shouldn't change case Darin Adler
- Re: [whatwg] .localName shouldn't change case Thomas Broyer
- Re: [whatwg] .localName shouldn't change case Simon Pieters
- Re: [whatwg] .localName shouldn't change case Maciej Stachowiak
