W3C home > Mailing lists > Public > public-webapi@w3.org > February 2008

Re: [selectors-api] What DOM feature "Selectors API" belongs to?

From: Anne van Kesteren <annevk@opera.com>
Date: Fri, 15 Feb 2008 00:32:34 +0100
To: "Lachlan Hunt" <lachlan.hunt@lachy.id.au>, "Sam Weinig" <weinig@apple.com>
Cc: "Web API WG (public)" <public-webapi@w3.org>
Message-ID: <op.t6jfokkx64w2qv@annevk-t60.oslo.opera.com>

On Fri, 15 Feb 2008 00:22:38 +0100, Lachlan Hunt  
<lachlan.hunt@lachy.id.au> wrote:
> The assumption probably arises from the fact that many of the DOM2  
> interfaces, such as Document, Element, Node, etc. are exposed like that.  
>   While it makes sense for some of those because, for example, the have  
> constants defined for them (e.g. Node.ELEMENT_NODE) or because it allows  
> for their prototypes to be extended (e.g. Element.prototype), the value  
> of exposing them for selectors api is questionable at best.

Indeed. In another thread I requested functionality to be added to DOM  
Bindings so you could indicate whether the interface is exposed or not or  
way to define what the "base" interface it is which has the same effect  
but might be cleaner as it also removes the need to say "objects  
implementing interface X must also implement interface XY".

>> Regarding the returning a StaticNodeList, the implementation in Safari  
>> returns an object that implements the StaticNodeList interface, though  
>> that happens to be the same as the NodeList interface.  One potential  
>> issue here is that we don't expose a StaticNodeList constructor on the  
>> window (window.StaticNodeList) but instead use the NodeList's  
>> constructor.
> Given that, I believe it would be better if the spec was more honest  
> about this issue by simply stating that an object implementing the  
> NodeList interface is returned, but that the list is not live.  I will  
> consider making that change soon.

Yeah, we should drop StaticNodeList and add a note that DOM Level 3 Core  
saying NodeList is "live" is a bug.

Anne van Kesteren
Received on Thursday, 14 February 2008 23:28:56 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:16:25 UTC