W3C home > Mailing lists > Public > public-webapi@w3.org > March 2006

Re: ACTION-87: Selectors API

From: Anne van Kesteren <annevk@opera.com>
Date: Wed, 22 Mar 2006 15:08:47 +0100
To: "Jim Ley" <jim@jibbering.com>
Cc: "Web APIs WG (public)" <public-webapi@w3.org>
Message-ID: <op.s6tiwxk464w2qv@id-c0020.oslo.opera.com>

On Wed, 22 Mar 2006 14:43:29 +0100, Jim Ley <jim@jibbering.com> wrote:
>> There is now:
>>
>>  .match()
>>  .matchAll()
>>
>> ... per some discussion on #webapi. Thanks for your feedback.
>
> as per later discussion on #webapi, please change these names, .match is  
> too similar to match in ES, and I would expect it to take a regular  
> expression (perfectly reasonable to run a regular expression over a DOM).

Fair enough, here are the requirements for the name:

* short
* simple

... suggestions are welcome.


> Also it's very odd to have .match() return only the first of something,  
> it should return all of them, like everywhere else the name is used to  
> avoid confusion (I'm not sure of the use case of just matching one  
> anyway, please provide - if it's scripting performance, let's have a  
> limit on the general case, because I often only what the first 4 things  
> as much as only 1, gEBI covers the 1 case...)

The reason is performance.


> Mainly these names say nothing about their inescapable link to  
> Selectors, they should.

What would be the reason for that?


-- 
Anne van Kesteren
<http://annevankesteren.nl/>
<http://www.opera.com/>
Received on Wednesday, 22 March 2006 14:09:05 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 8 January 2008 14:18:54 GMT