On 4/13/11 5:43 AM, Lachlan Hunt wrote:
I didn't think so, but then perhaps I misunderstand what the spec means
by a native object. ECMAScript defines a native object as
object in an ECMAScript implementation whose semantics are fully
defined by this specification rather than by the host
On 4/13/11 6:20 AM, Lachlan Hunt wrote:
Which conversion algorithm applies here? Is it 4.1.15. object, or
4.1.16. Interface types?
http://dev.w3.org/2006/webapi/WebIDL/#es-object
The latter, since Node is an interface type.
-Boris
Lachlan Hunt:
However, with the way in which the IDL is overloaded, it's not clear
to me which of the two overloaded methods gets invoked when the
parameter is null.
The IDL says:
querySelector(in DOMString selectors, in optional Element refElement);
querySelector(in DOMString
On 2011-04-13 04:43, Cameron McCormack wrote:
Lachlan Hunt:
This seems to differ from the algorithm given for T[], which
requires that the object be either an array host object or a native
object, which would not handle the JQuery case. The sequenceT
type seems more generic than that as the
On 2011-04-13 06:32, Cameron McCormack wrote:
Lachlan Hunt:
OK. Then I'm not sure what the practical difference between the
Element[] or sequenceElement would be then, nor which one to use.
... the only difference is that with Element[] you can distinguish
between null and an array of
Lachlan Hunt:
I reviewed WebIDL again, and I think I've started to understand the
difference between sequenceT and T[] now.
As I understand it, the algorithm to convert an ECMAScript object to
an IDL sequence should work with any object that has a length
property and indexed values
On 4/10/11 4:30 AM, Lachlan Hunt wrote:
Would it be useful, and is it possible to define the refElements
parameter to accept any object that contains a .length and indexed
properties, just like a JQuery object?
Looks like this already got answered, but yes, sequenceNode should
make that work.
On 4/10/11 12:02 PM, Lachlan Hunt wrote:
I've updated and simplified the spec to handle the above case using the
parameter sequenceNode. I still need to update the prose to say that
while the collections may contain any Node, only Element nodes are added
to the list of contextual reference
Lachlan Hunt:
OK. Then I'm not sure what the practical difference between the
Element[] or sequenceElement would be then, nor which one to use.
Boris Zbarsky:
I'm not either. That's why Cameron is cced.
If you are choosing between those two for the type of an argument,
and you don’t have
Cameron McCormack:
then the only difference is that with Element[] you can distinguish
between null and an array of length 1, while with sequenceElement you
can’t.
Length 0, not 1.
--
Cameron McCormack ≝ http://mcc.id.au/
On 2011-04-09 19:14, Boris Zbarsky wrote:
On 4/9/11 6:27 AM, Lachlan Hunt wrote:
There were cases in JQuery where the script wanted to iteratively run a
selector on all nodes in a collection, and return elements that are
descendants of those elements. This allows :scope to be used in those
On 2011-04-10 13:30, Lachlan Hunt wrote:
But is jquery's collection a JS Array?
The object returned by the $() function isn't an array. It's a custom
object that mimics the functionality of an array...
var p = $(p.foo)
Var a = $(a);
a[0].matchesSelector(:scopea, p)
...
Would it be useful, and
On 04/09/2011 07:14 PM, Boris Zbarsky wrote:
On 4/9/11 6:27 AM, Lachlan Hunt wrote:
I also have to include one for HTMLCollection, which doesn't inherit
from NodeList.
Yeah, that's broken... I wonder whether we can just fix that in Web DOM
Core or something
If people are willing to
I have two questions about
http://www.w3.org/TR/selectors-api2/#determine-contextual-reference-nodes
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
On 2011-04-09 10:12, Boris Zbarsky wrote:
I have two questions about
http://www.w3.org/TR/selectors-api2/#determine-contextual-reference-nodes
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.
On 4/9/11 6:27 AM, Lachlan Hunt wrote:
There were cases in JQuery where the script wanted to iteratively run a
selector on all nodes in a collection, and return elements that are
descendants of those elements. This allows :scope to be used in those
cases by passing the collection as the
16 matches
Mail list logo