Re: [whatwg] Case canonicalization for reflected enumerated attributes limited to known values
On Mon, Aug 23, 2010 at 1:11 AM, Mounir Lamouri mounir.lamo...@gmail.com wrote: This is actually a recent change in the specification so you should not expect to have all browsers working the same way. FWIW, Firefox nightlies already follow this change. That will be in beta5 too. Ah, okay. I guess I have to start tracking changes to the spec so I'm aware of things like this.
Re: [whatwg] Case canonicalization for reflected enumerated attributes limited to known values
On 08/17/2010 09:20 PM, Aryeh Gregor wrote: Actually, it goes further than that. Everyone but IE seems to just return the value of the content attribute when you do a get on the IDL attribute: !doctype html script var el = document.createElement(form); el.setAttribute(method, invalid value); alert(el.method); /script IE alerts get, everyone else alerts invalid value. Are non-IE implementers interested in changing to match IE here? IE's behavior seems more useful. Hi, This is actually a recent change in the specification so you should not expect to have all browsers working the same way. FWIW, Firefox nightlies already follow this change. That will be in beta5 too. Thanks, -- Mounir
[whatwg] Case canonicalization for reflected enumerated attributes limited to known values
Test case: !doctype html script var el = document.createElement(form); el.setAttribute(method, get); alert(el.method); el.setAttribute(method, GET); alert(el.method); /script Spec: 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) . . . http://www.whatwg.org/specs/web-apps/current-work/multipage/urls.html#reflecting-content-attributes-in-idl-attributes 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 )
Re: [whatwg] Case canonicalization for reflected enumerated attributes limited to known values
Actually, it goes further than that. Everyone but IE seems to just return the value of the content attribute when you do a get on the IDL attribute: !doctype html script var el = document.createElement(form); el.setAttribute(method, invalid value); alert(el.method); /script IE alerts get, everyone else alerts invalid value. Are non-IE implementers interested in changing to match IE here? IE's behavior seems more useful.