This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 14569 - URL object should not return DOMTokenList
Summary: URL object should not return DOMTokenList
Status: RESOLVED FIXED
Alias: None
Product: WHATWG
Classification: Unclassified
Component: URL (show other bugs)
Version: unspecified
Hardware: PC All
: P2 normal
Target Milestone: Unsorted
Assignee: Anne
QA Contact: sideshowbarker+urlspec
URL: http://dvcs.w3.org/hg/url/raw-file/ti...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-10-26 22:47 UTC by Erik Arvidsson
Modified: 2012-12-21 14:40 UTC (History)
8 users (show)

See Also:


Attachments

Description Erik Arvidsson 2011-10-26 22:47:21 UTC
http://dvcs.w3.org/hg/url/raw-file/tip/Overview.html

  readonly attribute DOMTokenList parameterNames;
  DOMTokenList getParameterAll(DOMString name);

These should both use DOMString[] instead of DOMTokenList.
Comment 1 Adam Barth 2011-10-26 23:54:22 UTC
The URL spec is probably going to wind up in the webapps WG.  That's probably the right "product" to file these bugs against.
Comment 2 Erik Arvidsson 2011-10-26 23:58:14 UTC
There is no good Component for this at the moment so randomly picking one.
Comment 3 Anne 2011-10-27 08:54:50 UTC
Something like DOMTokenList could rid us of getParameter(), appendParameter(), and clearParameter() though...
Comment 4 Anne 2011-10-27 10:10:05 UTC
Though I guess if it's a mutable array that goes for arrays too.
Comment 5 Anne 2011-10-27 10:13:07 UTC
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.
Comment 6 Erik Arvidsson 2011-10-27 16:45:08 UTC
(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.
Comment 7 Adam Barth 2011-10-27 18:12:14 UTC
Yeah, the intention was for them to be snapshots.
Comment 8 Erik Arvidsson 2012-02-28 17:22:43 UTC
What is blocking the spec from being updated?

DOMString[] getParameterAll(DOMString name);
Comment 9 Adam Barth 2012-03-01 04:24:04 UTC
Fixed.
Comment 10 Anne 2012-03-01 08:52:30 UTC
You "fixed" this by changing Overview.html, rather than fixing Overview.src.html and generating Overview.html.
Comment 11 Anne 2012-03-01 08:53:32 UTC
Oops, missed something there reading the diff. Sorry!
Comment 12 Adam Barth 2012-03-01 08:56:18 UTC
I edited both manually, so I'm sure I screwed it up somehow.  :)