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

More questions about contextual reference nodes

From: Boris Zbarsky <bzbarsky@MIT.EDU>
Date: Sat, 09 Apr 2011 01:12:48 -0700
Message-ID: <4DA01500.5020105@mit.edu>
To: Lachlan Hunt <lachlan.hunt@lachy.id.au>
CC: public-webapps <public-webapps@w3.org>
I have two questions about 

1)  What are the use cases for supplying more than one contextual 
reference node, exactly?  It seems weird to allow more than one node to 
match :scope.

2)  If we do want to allow the multiple node thing, can we please do it 
in IDL instead of the (currently pretty vague) prose?  Something like:

   Element querySelector(in DOMString selectors,
                         in optional Element refElement);
   Element querySelector(in DOMString selectors,
                         in optional NodeList refElements);
   Element querySelector(in DOMString selectors,
                         in optional sequence<Element> refElements);

or some such?  It's not quite clear to me whether we want a 
"sequence<Element>" or a "T[]"; that's worth checking.  In either case, 
the prose will need to define what happens with the NodeList or 
sequence/array cases, but there will be no ambiguity about how one gets 
Elements out of what's passed in.  The one difference is that in the 
array case if non-elements are present in the array an exception will be 
thrown.  I think that's fine, myself.

Received on Saturday, 9 April 2011 08:13:21 UTC

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