Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.javascript > #12433

Re: CSS Use of ID

From "Jukka K. Korpela" <jkorpela@cs.tut.fi>
Newsgroups comp.lang.javascript
Subject Re: CSS Use of ID
Date 2012-03-06 15:21 +0200
Organization A noiseless patient Spider
Message-ID <jj530e$nsb$1@dont-email.me> (permalink)
References <qhabl79jrmuqqhda7kvu7mce8me5n9aoe9@4ax.com> <XnsA00E70997BCB8eejj99@194.109.133.133> <jj4pdl$5m4$1@dont-email.me> <46dfb1ba-586f-4a95-9935-8b0495852e84@i2g2000vbv.googlegroups.com>

Show all headers | View raw


2012-03-06 14:24, Scott Sauyet wrote:

> Jukka K. Korpela wrote:
>> Evertjan. wrote:
>>> More so, if you accidentaly use an id more than once, most browsers will
>>> forgive you your grave error and only use the first id.
>>
>> I wouldn't count on that. I've seen situations where browsers behave as
>> if no element had the id.
>
> Do you have any examples of that?

I have actively forgotten them.

> You're right that it might be a better way to handle such an error,
> but I've yet to see it.  What JS engines were involved?

If I could imagine some potential gain, I might be persuaded to 
construct some examples. But I'm not really interested.

Using id attribute as a unique identifier is such a basic principle, the 
essence of the very attribute, that it's not particularly relevant to 
analyze what happens if you use the attribute for something that is 
completely incompatible with its essence.

It can be relevant in debugging existing code, but the uniqueness of id 
attribute values is a formal syntactic requirement in HTML, so any 
violations will be detected by a markup validator.

-- 
Yucca, http://www.cs.tut.fi/~jkorpela/

Back to comp.lang.javascript | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

CSS Use of ID Gene Wirchenko <genew@ocis.net> - 2012-03-05 22:15 -0800
  Re: CSS Use of ID "Evertjan." <exjxw.hannivoort@interxnl.net> - 2012-03-06 10:04 +0000
    Re: CSS Use of ID "Jukka K. Korpela" <jkorpela@cs.tut.fi> - 2012-03-06 12:37 +0200
      Re: CSS Use of ID Scott Sauyet <scott.sauyet@gmail.com> - 2012-03-06 04:24 -0800
        Re: CSS Use of ID "Jukka K. Korpela" <jkorpela@cs.tut.fi> - 2012-03-06 15:21 +0200
      Re: CSS Use of ID David Mark <dmark.cinsoft@gmail.com> - 2012-03-12 17:09 -0700
  Re: CSS Use of ID Norman Peelman <npeelmandog@cfl.rr.com> - 2012-03-06 06:40 -0500
    Re: CSS Use of ID Gene Wirchenko <genew@ocis.net> - 2012-03-06 11:27 -0800
      Re: CSS Use of ID Denis McMahon <denismfmcmahon@gmail.com> - 2012-03-07 01:49 +0000
      Re: CSS Use of ID Norman Peelman <npeelmandog@cfl.rr.com> - 2012-03-06 23:13 -0500
        Re: CSS Use of ID Gene Wirchenko <genew@ocis.net> - 2012-03-06 22:32 -0800
  Re: CSS Use of ID Scott Sauyet <scott.sauyet@gmail.com> - 2012-03-06 04:36 -0800
    Re: CSS Use of ID Gene Wirchenko <genew@ocis.net> - 2012-03-06 11:29 -0800
  Re: CSS Use of ID Ross McKay <au.org.zeta.at.rosko@invalid.invalid> - 2012-03-07 11:58 +1100

csiph-web