On Fri, 06 Jul 2007 23:38:37 +0200, Sander <[EMAIL PROTECTED]> wrote:

Dan Dorman schreef:
On 7/6/07, Sander <[EMAIL PROTECTED]> wrote:
I haven't read the whole draft yet so maybe it's in there, but can you,
or anyone else, explain why there is both a selectElement and a
selectAllElements method?
...
If you know you're after one element, you get to deal with it directly
rather than first referencing the only contents of a single-element
array.
But document.selectAllElements("#first")[0] would do the trick.

The working group recognises that this is not necessarily critical either way, but decided on having the single element method as an optimisation that does something reasonably useful (in our opinion) for both the implementors of user agents and the authors of code.

It is listed as issue 110 in the WebAPI group issue tracker.

Cheers

Chaals

--
  Charles McCathieNevile, Opera Software: Standards Group
  hablo español  -  je parle français  -  jeg lærer norsk
[EMAIL PROTECTED]    Catch up: Speed Dial   http://opera.com

Reply via email to