W3C home > Mailing lists > Public > whatwg@whatwg.org > September 2005

[whatwg] Re: getElementsByClassName

From: Brad Neuberg <bradneuberg@yahoo.com>
Date: Mon, 5 Sep 2005 22:08:18 -0700 (PDT)
Message-ID: <20050906050819.59073.qmail@web60720.mail.yahoo.com>


--- Dean Edwards <dean at edwards.name> wrote:

> Ian Hickson wrote:
> > On Tue, 6 Sep 2005, Dean Edwards wrote:
> > 
> >>>>It would be better to define that class names
> should not contain 
> >>>>white space.
> >>>
> >>>Well, we can't really control that, I mean, other
> languages can invent 
> >>>whatever they want (and frequently do).
> >>
> >>I thought we were controlling that. Isn't that
> what we are doing?
> > 
> > 
> > We're defining what "class" means for HTML(5), and
> what the behaviour of 
> > getElemetsByClassName() in the DOM should be. But
> if someone invents 
> > FooBarML that has classes with spaces in it, CSS
> will match them (for 
> > example, ".a\ b"), and I don't see why
> getElementsByClassName should not 
> > be capable of matching them given that it falls
> simply out of the current 
> > definition.
> > 
> > However, this is all highly theoretical.
> > 
> 
> That's right. We are defining HTML5 and the DOM
> extensions to support 
> it. If other languages want to add different class
> name delimiters, let 
> them. My hunch is that they will follow suit. This
> is a good opportunity 
> to make it clear. HTML has always led the way. It
> also ensures 
> backward-compatibility.

Exactly; what exactly would some theoretical language
gain by allowing spaces in class values? Might as well
keep it simple and not allow them, following current
practice.

Brad

> 
> -dean
> 
> 
Received on Monday, 5 September 2005 22:08:18 UTC

This archive was generated by hypermail 2.4.0 : Wednesday, 22 January 2020 16:58:42 UTC