[whatwg] [html5] attributes in text/html
ian at hixie.ch
Thu May 24 12:37:24 PDT 2007
On Fri, 30 Sep 2005, Anne van Kesteren wrote:
> I tested attribute parsing, createAttribute and setAttribute in Opera, Firefox
> and Internet Explorer.
> It seems that Firefox lowercases all unknown and known attributes. It
> seems that Opera and Internet Explorer lowercase all known attributes
> unless they are created using createAttribute. Opera and Internet
> Explorer do not touch unknown attributes.
What Opera does is more complex than that actually. For example it turns
<p tesT=a TEST=a TeSt=a test=a>
<p tesT="a" tesT="a" tesT="a" tesT="a">
...which makes no sense.
IE also returns four attributes for this, which would require the
tokeniser to have element-specific knowledge, which I really don't think
is a good idea.
In the DOM, though, we want XML and HTML to be as close to each other as
possible. I think the current rules in the spec are as good as we can get
(Given the lack of interoperability here we have some flexibility.)
Ian Hickson U+1047E )\._.,--....,'``. fL
http://ln.hixie.ch/ U+263A /, _.. \ _\ ;`._ ,.
Things that are impossible just take longer. `._.-(,_..'--(,_..'`-.;.'
More information about the whatwg