W3C home > Mailing lists > Public > whatwg@whatwg.org > October 2012

Re: [whatwg] URL: URLQuery

From: Anne van Kesteren <annevk@annevk.nl>
Date: Sat, 13 Oct 2012 10:24:03 +0200
Message-ID: <CADnb78hAAzwU4+AkMix8dcrOF6SeHLA-X0qiTE+TEuSzjK2wAQ@mail.gmail.com>
To: Glenn Maynard <glenn@zewt.org>
Cc: WHATWG <whatwg@whatwg.org>
On Sat, Oct 13, 2012 at 12:02 AM, Glenn Maynard <glenn@zewt.org> wrote:
> On Fri, Oct 12, 2012 at 11:10 AM, Anne van Kesteren <annevk@annevk.nl>
> wrote:
>> http://url.spec.whatwg.org/#urlutils
> The object paradigm is more natural for the common case:
> query.values["key"] = value; // get()
> console.log(query.values["key"]); // set()
> delete query.values["key"]; // delete()
> query.getAll("key"); // stays as-is

Where did .values come from? (And you reversed get()/set() right?)

>> 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.
> The questions there (query parameter called "length", "interface and the
> data separate", "number of parameters") may have made sense for the original
> link that was posted, but the text in that page has changed and I never saw
> it.  None of those questions seem to apply to the above interface.

It was a more limited version of this interface (the problem with
length was more about what would happen if you would add such a

interface URLQuery {
  getter sequence<DOMString> (DOMString name);
  setter void (DOMString name, (sequence<DOMString> or DOMString) value);
  creator void (DOMString name, (sequence<DOMString> or DOMString) value);
  deleter void (DOMString name);

I don't know about JavaScript Map as to whether that would be reusable
in some way. We have some special requirements from last thread:

* Keys can have more than one value.
* Keys are ordered behind the scenes.

If it is reusable that would be great. I guess Web IDL then needs to
be updated somehow to give us some hooks.

Received on Saturday, 13 October 2012 08:24:31 UTC

This archive was generated by hypermail 2.3.1 : Monday, 13 April 2015 23:09:17 UTC