W3C home > Mailing lists > Public > whatwg@whatwg.org > May 2012

[whatwg] classList should perhaps move from HTMLElement to Element

From: Cameron McCormack <cam@mcc.id.au>
Date: Thu, 03 May 2012 10:31:40 +1000
Message-ID: <4FA1D1EC.9090106@mcc.id.au>
Rik Cabanier:
> There was a discussion in the SVG WG about dropping the
> SVGAnimatedxxx objects and have replace them with regular values. We
> would need some tricks so we can change the DOM, but make it
> backward compatible at the same time.

We have discussed this a few times, and I would desparately love for it
to work, but I am unconvinced it will.  I can an imagine an author
writing code like:

   if (!elt.className) ...

to test if a class has been set.  Even if we made the
SVGElement.className SVGAnimatedString object one that stringifies to
the class, add a [PutForwards] on to it so that assigning a string
works, it would still break the above code, since the ! operator always
returns false for an object.
Received on Wednesday, 2 May 2012 17:31:40 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 30 January 2013 18:48:08 GMT