Bugzilla – Bug 14569
URL object should not return DOMTokenList
Last modified: 2012-12-21 14:40:34 UTC
readonly attribute DOMTokenList parameterNames;
DOMTokenList getParameterAll(DOMString name);
These should both use DOMString instead of DOMTokenList.
The URL spec is probably going to wind up in the webapps WG. That's probably the right "product" to file these bugs against.
There is no good Component for this at the moment so randomly picking one.
Something like DOMTokenList could rid us of getParameter(), appendParameter(), and clearParameter() though...
Though I guess if it's a mutable array that goes for arrays too.
Oops, ignore comment 3 and comment 4. Somehow forgot about values there. If we want to use a data structure it would have to be DOMStringMap or some such.
(In reply to comment #5)
> Oops, ignore comment 3 and comment 4. Somehow forgot about values there. If we
> want to use a data structure it would have to be DOMStringMap or some such.
The problem is that the parameter names are not unique so a map would not really work either.
var url = new URL('http://www.example.com/index.cgi?a=A&b=B&a=A2');
url.parameterNames; // ['a', 'b', 'a']
I'm suggesting all these arrays would just be snapshots.
Yeah, the intention was for them to be snapshots.
What is blocking the spec from being updated?
DOMString getParameterAll(DOMString name);
You "fixed" this by changing Overview.html, rather than fixing Overview.src.html and generating Overview.html.
Oops, missed something there reading the diff. Sorry!
I edited both manually, so I'm sure I screwed it up somehow. :)