W3C home > Mailing lists > Public > public-webapi@w3.org > January 2007

Selectors API: Multiple elements with the same ID

From: Simon Pieters <zcorpan@gmail.com>
Date: Sat, 27 Jan 2007 19:18:15 +0100
To: "public-webapi@w3.org" <public-webapi@w3.org>
Message-ID: <op.tmtrspso7a8kvn@hp-a0a83fcd39d2>


Stephen Chapman said:

> Since having a second element with the same ID is invalid there is no  
> need for a browser to continue looking once it finds the first one since  
> the subsequent ones shouldn't be there and it is therefore more correct  
> to ignore them and assume that they don't exist than it would be to  
> continue searching for something which in a valid page wont be there.  
> Any browser that continues searching once it finds the first occurrence  
> of an id is just being inefficient.

Perhaps this case has to be defined explicitly. Should getAll() (or  
whatever it ends up being called) catch only the first element when  
there's an ID in the selector (not group of selectors), or would it catch  
all elements that match the selector?

Simon Pieters
Received on Saturday, 27 January 2007 18:18:19 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:16:22 UTC