W3C home > Mailing lists > Public > whatwg@whatwg.org > February 2013

Re: [whatwg] [URL] Cargo-cult naming in URL and matching

From: Anne van Kesteren <annevk@annevk.nl>
Date: Thu, 7 Feb 2013 17:27:34 +0000
Message-ID: <CADnb78hZBXsyMfbH86xFbc96sGeDpARoUFyFuTe7nQpRzmiAiw@mail.gmail.com>
To: Alex Russell <slightlyoff@google.com>
Cc: whatwg <whatwg@lists.whatwg.org>, Jake Archibald <jakearchibald@google.com>
On Thu, Feb 7, 2013 at 5:16 PM, Alex Russell <slightlyoff@google.com> wrote:
> It doesn't appear straightforward to test if two URL objects reference the
> same path. The serialization algorithm has as flag for omitting the
> fragment, but not the query. Is there something in the API that I'm missing
> that would make this easier than custom-serializing 2 URLs to omit queries
> and then test string equality?

new URL(path, base).pathname == new URL(path2, base).pathname ought to work.


> The word "search" seems drived from window.location's use of that. Is it
> only included for compat with window.location? if so, can we drop it and
> spec window.location to use a subclass that provides it?

It's used by <a>, <area>, Location, and WorkerLocation. I think we
should just embrace that the string variant is named search
personally.


-- 
http://annevankesteren.nl/
Received on Thursday, 7 February 2013 17:27:58 UTC

This archive was generated by hypermail 2.3.1 : Monday, 13 April 2015 23:09:19 UTC