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

Re: Selectors API naming

From: Anne van Kesteren <annevk@opera.com>
Date: Fri, 22 Dec 2006 15:38:59 +0100
To: "Doug Schepers" <doug@schepers.cc>
Cc: "Web API WG (public)" <public-webapi@w3.org>
Message-ID: <op.tkytm9gr64w2qv@id-c0020.orange.nl>

On Thu, 21 Dec 2006 23:56:14 +0100, Doug Schepers <doug@schepers.cc> wrote:
>> These four methods all return a _live_ NodeList meaning that when  
>> something in the DOM is changed the variable that holds the NodeList is  
>> changed accordingly, if needed.
>
> document.getElementById() returns an element, not a nodeList [0].  It  
> doesn't seem that it's live.

Fair enough, the element returned is "live" though. (It's a direct  
reference to the one in the tree.)


> document.getElementBySelector() should return an element, not a nodeList  
> (live or static); it's like document.getElementById().

Yeah, matchSingle works like that already.


> [...]


-- 
Anne van Kesteren
<http://annevankesteren.nl/>
<http://www.opera.com/>
Received on Friday, 22 December 2006 14:39:27 GMT

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