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

[whatwg] Desired Features for Web Applications

From: Dean Edwards <dean@edwards.name>
Date: Wed, 20 Apr 2005 19:30:17 +0100
Message-ID: <42669FB9.90609@edwards.name>
Brad Neuberg wrote:
> * Right now most people directly access an elements className property, 
> without realizing that they might be clobbering multi-classed elements 
> (i.e. something with class="class1 class2").  I usually have to create 
> wrapper methods to ensure that this doesn't happen, such as 
> xAddClass(target, className), xRemoveClass(target, className), and 
> xHasClass(target, className), but it would be much nicer if the 
> className property itself had better support for multi-classed 
> elements.  Some example possibilities of what this might look like:
>         * someElement.className.add("someNewClass")
>         * someElement.className.remove("SomeOldClass")
>         * someElement.className.hasClass("someClass")
> 

+1
Received on Wednesday, 20 April 2005 11:30:17 UTC

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