Re: A URL API

Tab Atkins Jr. wrote:
> On Fri, Sep 17, 2010 at 5:43 PM, Adam Barth <w3c@adambarth.com> wrote:
>> I've removed the searchParameters attribute from the URL interface for
>> the time being.  We can consider adding it back at a later time.
> 
> ;_;
> 
> Just today my cubemate asked me if there was any way to get at the
> search parameters of a URL without parsing it himself.  I replied "No,
> but abarth started working on an API for it today.".
> 
> That said, Garrett's right.  The values of the dict should be arrays.
> Most of the time they'll be single-element arrays, but the benefit of
> having a consistent type of value at all times is better than the
> benefit of being able to omit "[0]" from parts of your code.

+1 in every way, and if somebody wanted to miss the [0] they could make 
a simple get function which returned array or single element based on 
array.length, in userland.

regards,

nathan

Received on Saturday, 18 September 2010 01:01:24 UTC