W3C home > Mailing lists > Public > public-webapi@w3.org > April 2007

Re: Proposal: getElementsBySelector()

From: Jonas Sicking <jonas@sicking.cc>
Date: Fri, 20 Apr 2007 16:28:22 -0700
Message-ID: <46294C96.7020709@sicking.cc>
To: Anne van Kesteren <annevk@opera.com>, Web APIs WG <public-webapi@w3.org>

Anne van Kesteren wrote:
> 
> Given the input from Björn I suppose there's no real need for a method 
> that returns a single element node (assuming implementations make that 
> optimization). Given that, I propose we rename .getAll() to 
> .getElementsBySelector() and drop .get() (on both Document and Element).

I don't actually think it will be possible to make this optimization. In 
the past we talked about mapping the StaticNodeList interface in the 
ECMAScript bindings to a normal ECMA array. And possibly do the same 
thing in other languages such as Java. This means that we can't use a 
custom class that performs the lazy evaluation.

Though looking at the latest version of the spec it looks like 
StaticNodeList does not map to arrays, was that idea dropped or is it 
just not in the spec yet?

/ Jonas
Received on Friday, 20 April 2007 23:30:07 GMT

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