[whatwg] Desired Features for Web Applications
Dean Edwards
dean at edwards.name
Wed Apr 20 11:30:17 PDT 2005
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
More information about the whatwg-whatwg.org
mailing list