Re: Selectors API: Multiple elements with the same ID

2007-01-27 Thread Anne van Kesteren
On Sat, 27 Jan 2007 13:30:58 -0500, Bjoern Hoehrmann [EMAIL PROTECTED] wrote: This is out of scope of the document. The method would return all elements that match the selector. When an element matches a selector is defined by the CSS Selectors specification. If that specification is unclear

Re: Selectors API: Multiple elements with the same ID

2007-01-27 Thread Robert Sayre
On 1/27/07, Anne van Kesteren [EMAIL PROTECTED] wrote: Yes, they are prolly slightly different (although I haven't actually seen any documentation on how getElementById exactly works). MSDN says it returns the first object.

Re: Selectors API: Multiple elements with the same ID

2007-01-27 Thread Bjoern Hoehrmann
* Anne van Kesteren wrote: Yes, they are prolly slightly different (although I haven't actually seen any documentation on how getElementById exactly works). Do you have any proposed text? Or should we wait until it's clear how getElementById really works? Well, something like: Note:

Re: Selectors API: Multiple elements with the same ID

2007-01-27 Thread Boris Zbarsky
Robert Sayre wrote: MSDN says it returns the first object. http://msdn.microsoft.com/workshop/author/dhtml/reference/methods/getelementbyid.asp For what it's worth, that's not what Gecko does, and I personally would rather not try to enforce that -- it's somewhat expensive to do so in the

Re: Selectors API: Multiple elements with the same ID

2007-01-27 Thread Boris Zbarsky
Bjoern Hoehrmann wrote: Note: .foo(#id) is not equivalent to document.getElementById('id') if multiple elements have the same ID. This method returns the first element in document order with the given ID, while getElementById's behavior is undefined in this case. I would like to put