W3C home > Mailing lists > Public > www-svg@w3.org > July 2012

Re: classList should perhaps move from HTMLElement to Element

From: Ian Hickson <ian@hixie.ch>
Date: Tue, 10 Jul 2012 22:02:01 +0000 (UTC)
To: Boris Zbarsky <bzbarsky@MIT.EDU>, Rik Cabanier <cabanier@gmail.com>, Cameron McCormack <cam@mcc.id.au>, Erik Dahlstrom <ed@opera.com>
cc: www-svg <www-svg@w3.org>
Message-ID: <Pine.LNX.4.64.1207102158170.30734@ps20323.dreamhostps.com>
On Wed, 2 May 2012, Boris Zbarsky wrote:
> >
> > How do you handle the difference between SVG and HTML's className?
> 
> Right now in Gecko it's on HTMLElement (and XULElement), with a 
> domstring return value and on SVGStylable with a SVGAnimatedString 
> return value.
> 
> Longer term we could put it on Element and just have SVG shadow it, of 
> course.
> 
> I would love being able to drop the SVG-specific className, but I bet 
> there's content [that depends on it.]
> 
> > I think it would be confusing to have classList work the same on both 
> > but not className.
> 
> Why?  It doesn't seem to be any more confusing than the fact that 
> className is present on both and just acts totally differently to start 
> with...

On Fri, 4 May 2012, Erik Dahlstrom wrote:
> 
> I don't think the use of animated 'class' attributes in svg is all that 
> common, and I'd favor an approach that'd makes .className in svg a bit 
> more like the html .className, perhaps in the way Cameron is suggesting.
> 
> On the topic of which interface the .classList property should be in, 
> Element seems better than HTMLElement.

Ok. I've removed className and classList from HTML, leaving DOM Core's 
definitions as the only definitions (on Element).

-- 
Ian Hickson               U+1047E                )\._.,--....,'``.    fL
http://ln.hixie.ch/       U+263A                /,   _.. \   _\  ;`._ ,.
Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'
Received on Tuesday, 10 July 2012 22:02:24 GMT

This archive was generated by hypermail 2.3.1 : Friday, 8 March 2013 15:54:51 GMT