W3C home > Mailing lists > Public > whatwg@whatwg.org > November 2012

Re: [whatwg] [URL] DOM API Feedback

From: Anne van Kesteren <annevk@annevk.nl>
Date: Fri, 16 Nov 2012 18:03:12 -0800
Message-ID: <CADnb78jKzPM2JHZQxZ-OhdCeG6cLNYEjaek4k-c-54UQ03-46Q@mail.gmail.com>
To: Alex Russell <slightlyoff@google.com>
Cc: whatwg <whatwg@whatwg.org>
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


> 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 :-)).

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

This archive was generated by hypermail 2.4.0 : Wednesday, 22 January 2020 16:59:48 UTC