This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.
Specification: http://www.whatwg.org/specs/web-apps/current-work/ Multipage: http://www.whatwg.org/C#reflecting-content-attributes-in-idl-attributes Complete: http://www.whatwg.org/c#reflecting-content-attributes-in-idl-attributes Comment: DOMTokenList example conflicts with current DOM Standard's definition Posted from: 121.102.72.108 User agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.52 Safari/537.17
How so?
DOMTokenList apparently changed from mutating an underlying string to directly mutating an attribute. However, in doing this, the definition was broken — the list of tokens is no longer properly initialised. I've updated the HTML spec to use DOMTokenList as currently specified (which is a normative change, it's not just the example that was wrong). Would be nice if you'd file bugs on the HTML spec when you make API changes like this. Would be even nicer not to make API changes like this. :-)
Checked in as WHATWG revision r7801. Check-in comment: Update integration with DOM for DOMTokenList and DOMSettableTokenList http://html5.org/tools/web-apps-tracker?from=7800&to=7801
The API changed per bug 20104 comment 4. The interface changed out of necessity, but my plan was to have the API change land in browsers first before bugging HTML about it. Why was this assigned to DOM?
See comment 2 paragraph 1 — the DOM spec doesn't initialise the list of tokens properly. (e.g. if you get .relList on a <a rel="a b"> element, it will act as if the list is empty.)
The idea is that HTML initializes the set. See the text around http://dom.spec.whatwg.org/#concept-class how the DOM does this for the class attribute. I'm happy to take suggestions for alternate solutions.
It's going to be the same for every attribute, no? Since DOMTokenList has an attribute associated with it, why not just factor out all the stuff that's going to be the same for every attribute? I don't understand what's special about, say, "rel" vs, say, "class", that should require that we have all the same algorithms defined again for each one.
*** Bug 23915 has been marked as a duplicate of this bug. ***
https://github.com/whatwg/dom/commit/ff812344b45d6e256c5479f533897eca260d04b4