Hi, Daniel-
Daniel Glazman wrote (on 3/28/08 3:15 PM):
Doug Schepers wrote:
Since Selectors API is meant to be a more comprehensive API than
Element Traversal, I would expect it to be able to deal with this more
general use case Daniel mentions, and personally would prefer to
increase the comprehensive functionality of that spec over Element
Traversal, which is meant to be more lightweight.
Ah. Adding
NodeList childElements;
is not lightweight ? It's incredibly simple, totally coherent with
what the DOM already offers, and web authors are perfectly used to
NodeList.
I'm open to changing it, since as I said, I introduced that
functionality in an earlier version of the spec, but removed it because
of negative feedback, primarily from Björn Höhrmann and Maciej
Stachowiak. I had other feedback from Boris Zbarsky and Stewart Brodie
that said linked lists could be implemented efficiently with clever
coding, but I took that as weaker advocacy than the stronger objections.
I'll also note that while Stewart and Boris are active contributors to
public-webapi, Björn and Maciej were WG members, and that played a small
factor in my decision.
Maybe that was a bad design choice.
The question is, can we revisit it in light of existing implementations
in JSR-280 and in deployed code in mobile devices? At the very least,
we would have to leave 'childElementCount', and add an additional
nodeList (be it static or live). At that point, yes, it does seem like
it might be getting a little heavy, and may also lead to
non-interoperable content.
I will liaison with JSR and with the SVG WG to see how they feel about
this decision. I can see both sides, so I'll abide by the will of the
WebAPI WG and the dependent groups.
[1] http://lists.w3.org/Archives/Public/public-webapi/2007Oct/0050.html
Regards-
-Doug Schepers
W3C Team Contact, SVG, CDF, and WebAPI