[whatwg] URL: URLQuery

Tab Atkins Jr. jackalmage at gmail.com
Fri Oct 12 15:24:28 PDT 2012


On Fri, Oct 12, 2012 at 9:10 AM, Anne van Kesteren <annevk at annevk.nl> wrote:
> I didn't really get around to working on URLs this week like I
> planned, but I managed to draft the query API that was discussed in
> the last thread:
>
> http://url.spec.whatwg.org/#urlutils
>
> get() returns the first value. getAll() returns all values. set()
> either sets a single or multiple values. delete() well, deletes.
>
> Based on discussion in #whatwg
> http://krijnhoetmer.nl/irc-logs/whatwg/20121012#l-981 I did not go
> with a design that would require proxies when implemented in
> JavaScript.
>
> Having said that, nothing is set in stone, bikeshed away! ;-)

I definitely prefer the "design that would require proxies" - it feels
more natural to me.  Glenn outlined a reasonable way to still mix in
the "getAll()" idiom.

If we do stick with the method-based map, I strongly feel we should
match the JS Map API, and have a has() method as well.  *Ideally*,
this would be a subclass of Map.

~TJ



More information about the whatwg mailing list