Re: [whatwg] [URL] DOM API Feedback

On Thu, Nov 8, 2012 at 6:22 AM, Alex Russell <slightlyoff@google.com> wrote:
> Next, nicely done on having a meaningful constructor! I do wonder if the
> "url" parameter should be optional as well as the base, since you may either
> want to build a URL using a URL object (to be serialized later).

That seems potentially difficult as the components are inter-dependent.


> GetWithEmptyPath() & GetOrigin() (despite their terrible C++ naming) are
> hugely useful for doing comparisons. I could imagine that there's some

Something seems omitted here. What exactly is GetWithEmptyPath()? As
Adam mentioned we have origin covered.


> "username" and "password" properties are missing

Added.


> There aren't any provided comparison functions. I.e., there's no way to tell
> if two URL objects reference the same absolute URL, if one references a path
> in the same domain, etc.

Would need more details here on what this is going to be used for as
there are many possible ways to compare URLs (starting with simple
string comparison, which is supported :-)).


-- 
http://annevankesteren.nl/

Received on Saturday, 17 November 2012 02:23:02 UTC