Selectors API IDL Issues

Hi,
   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:

1)
   [Supplemental]
   interface Element {
     Element   querySelector(in DOMString selectors, in optional any
     ...
   }

2)
   [NoInterfaceObject]
   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
http://lachy.id.au/
http://www.opera.com/

Received on Friday, 1 April 2011 20:52:13 UTC