Anne van Kesteren wrote:
On Sat, 21 Apr 2007 09:28:22 +1000, Jonas Sicking <[EMAIL PROTECTED]> wrote:
Anne van Kesteren wrote:
Given the input from Björn I suppose there's no real need for a
method that returns a single element node (assuming implementations
make that optimization). Given that, I propose we rename .getAll() to
.getElementsBySelector() and drop .get() (on both Document and Element).
I don't actually think it will be possible to make this optimization.
In the past we talked about mapping the StaticNodeList interface in
the ECMAScript bindings to a normal ECMA array. And possibly do the
same thing in other languages such as Java. This means that we can't
use a custom class that performs the lazy evaluation.
Though looking at the latest version of the spec it looks like
StaticNodeList does not map to arrays, was that idea dropped or is it
just not in the spec yet?
I dropped the idea for now until someone gets around to writing the
ECMAScript DOM binding(s) specification.
I think it would be a very nice thing to do in order to get better
integration with the various embedding languages. There's not really any
reason for the DOM to reinvent the wheel in all areas it's touching :)
That said, I talked it over with some of our JS guys and it seemed like
a non-trivial thing to do, but I need to discuss it some more.
/ Jonas