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 23:11:38 +0200
Message-ID: <CADnb78iQ6WXvA6yuiK9KQanTAgmWzdL43+gj8ZyFUG9+H45R+w@mail.gmail.com>
To: Mike Dierken <mike@dierken.com>
Cc: WHATWG <whatwg@whatwg.org>, Glenn Maynard <glenn@zewt.org>
On Sat, Oct 13, 2012 at 10:39 PM, Mike Dierken <mike@dierken.com> wrote:
> Since a URL query string is not a strict map with only one value for a
> key, would the get/set operations allow for an array as well as an
> atomic value?

Yes, see http://url.spec.whatwg.org/#urlquery

get(): gets the first value.
getAll(): gets all values.
set(name, value): sets name to a single value.
set(name, [value, value]): sets name to multiple values. (We might
want to make this variadic instead I think?)
delete(name): removes name and all its values.

Received on Saturday, 13 October 2012 21:12:09 UTC

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