Re: [whatwg] URL: URLQuery

On Fri, Dec 7, 2012 at 5:27 PM, Simon Kaegi <Simon_Kaegi@ca.ibm.com> wrote:
> 1) "query" is a "read-only" and not nullable. I could do this of course
> but just want to understand the intent.

It's nullable because query manipulation in this manner does not make
sense for a whole lot of URL schemes. It's not readonly so you can
construct your own URLQuery object and replace the one of the URL
object.


> 3) For "set" and "append" I accept null as a value (and also treat
> undefined as null). I do this to differentiate between the "?param=" and
> "?param" case.
> So...
> query.set("param", "") --> ?param=
> query.set("param", null) or query.set("param") --> ?param

This I have not done because the application/x-www-form-urlencoded
format does not do this either.

(Adding the iterators and such will come once IDL provides some hooks.)


> If there is an existing URL test suite or something we could as a starting
> point that would be helpful if you or anyone are aware of one.

https://github.com/cweb/url-testing is a project towards tackling that
as far as URL parsing goes. I haven't seen anything comprehensive yet
for the API, apart from the tests from the WebKit project.


--
http://annevankesteren.nl/

Received on Friday, 7 December 2012 21:59:31 UTC