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

Re: Selectors API: Multiple elements with the same ID

From: Bjoern Hoehrmann <derhoermi@gmx.net>
Date: Sun, 28 Jan 2007 00:20:04 +0100
To: "Anne van Kesteren" <annevk@opera.com>
Cc: "public-webapi@w3.org" <public-webapi@w3.org>
Message-ID: <s3nnr2d6nvunrkcavfj5sqlf66dv2mloi7@hive.bjoern.hoehrmann.de>

* 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: .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.
-- 
Björn Höhrmann · mailto:bjoern@hoehrmann.de · http://bjoern.hoehrmann.de
Weinh. Str. 22 · Telefon: +49(0)621/4309674 · http://www.bjoernsworld.de
68309 Mannheim · PGP Pub. KeyID: 0xA4357E78 · http://www.websitedev.de/ 
Received on Saturday, 27 January 2007 23:20:13 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 8 January 2008 14:18:56 GMT