W3C home > Mailing lists > Public > whatwg@whatwg.org > August 2010

[whatwg] Case canonicalization for reflected enumerated attributes limited to known values

From: Aryeh Gregor <Simetrical+w3c@gmail.com>
Date: Tue, 17 Aug 2010 15:08:34 -0400
Message-ID: <AANLkTi=zCU+1y=1ySNd5mMe2ZEmpfO5xW2V3aW2z0P7-@mail.gmail.com>
Test case:

<!doctype html>
   var el = document.createElement("form");
   el.setAttribute("method", "get");
   el.setAttribute("method", "GET");


If a reflecting IDL attribute is a DOMString whose content attribute
is an enumerated attribute, and the IDL attribute is limited to only
known values, then, on getting, the IDL attribute must return the
conforming value associated with the state the attribute is in (in its
canonical case) . . .

This says it should echo "GET" twice.  Four out of the five browsers I
tested in (Firefox 4 beta, Chrome dev, Safari 5, Opera 10.60) echo
"get" and then "GET".  IE8 and IE9PP4 echo "get" twice.  I think the
spec and IE are right here -- you should be able to test form.method
== "GET" (or == "get", whichever) and have it work whenever it's in
the GET state.  However, since 4/5 of browsers disagree, I'm asking if
anyone thinks the spec should be changed, before I file browser bugs.

(I've also filed a bug suggesting that the canonical case for this
keyword be lowercase:
http://www.w3.org/Bugs/Public/show_bug.cgi?id=10388 )
Received on Tuesday, 17 August 2010 12:08:34 UTC

This archive was generated by hypermail 2.4.0 : Wednesday, 22 January 2020 16:59:26 UTC