W3C home > Mailing lists > Public > public-webapps@w3.org > April to June 2011

Selectors API IDL Issues

From: Lachlan Hunt <lachlan.hunt@lachy.id.au>
Date: Fri, 01 Apr 2011 22:51:31 +0200
Message-ID: <4D963AD3.101@lachy.id.au>
To: public-webapps <public-webapps@w3.org>
CC: Cameron McCormack <cam@mcc.id.au>
   Presently, the IDL in Selectors API defines the NodeSelector 
interface using "[Supplemental, NoInterfaceObject]".

I'm not quite sure why I have supplemental in there, but it seems to be 
left over from an old edit that should have been removed, since 
NodeSelector is not a pre-existing interface that this is supplementing. 
  So I will be removing [Supplemental] from the IDL when I make the 
edits necessary to take the spec to PR.

It's also been brought to my attention that the use of 
[NoInterfaceObject] may not be quite right either and I would like to 
get clarification.

According to a mail from Cameron [1], the use of [NoInterfaceObject] and 
the implements statement has an observable difference from defining a 
Supplemental interface, though I originally thought there would not be. 
  I thought that the following were identical from a black box 
implementation perspective:

   interface Element {
     Element   querySelector(in DOMString selectors, in optional any

   interface NodeSelector {
     Element   querySelector(in DOMString selectors, in optional any
   Element implements NodeSelector

(And similarly for Document and DocumentFragment, omitted for simplicity)

The querySelector methods should exist on Element.prototype, which does 
seem to be what Opera, Gecko and WebKit do.

According to Cam's mail, that is what does happen in case #1, but is not 
in case #2, as in the current spec, though I'm not sure why.  So I would 
like to get clarification whether that is in fact the case, and whether 
[NoInterfaceObject] really is what I should be using here.

[1] http://lists.w3.org/Archives/Public/public-web-perf/2011Mar/0058.html

Lachlan Hunt - Opera Software
Received on Friday, 1 April 2011 20:52:13 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 18:13:18 UTC