Re: [url] What is "result"? (#5)

> So either explicitly set/return undefineds (or is it empty string? unclear) where necessary

It's undefined, not empty string.  At the moment, the constructor part of the spec hasn't been updated.  What the reference implementation does:

  * individual functions create is JS Objects, sometimes empty, sometimes with some properties set.
  * those individual functions may set some additional properties, and leave others unset.
  * the constructor initializes all of the expected properties, and then copies the properties that are returned by the parser.

In case this isn't clear, look at the constructor at the top of [url.js](https://url.spec.whatwg.org/reference-implementation/url.js) from the reference implementation.  The underscore prefixes to property names is an implementation detail (i.e., not intended to be a part of the spec), and this is to differentiate between the properties themselves and the getters and setters.



In some cases, there is a difference between null and empty string.  This actually is from Anne's original spec, and retained by my merged spec.

---
Reply to this email directly or view it on GitHub:
https://github.com/webspecs/url/issues/5#issuecomment-65525988

Received on Thursday, 4 December 2014 01:57:02 UTC