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

Re: [whatwg] classList should perhaps move from HTMLElement to Element

From: Rik Cabanier <cabanier@gmail.com>
Date: Wed, 2 May 2012 17:42:28 -0700
Message-ID: <CAGN7qDDzJcMQyv8mHopo7zMEoqjzuJ0QRJhvq5qZ7XZTp+Np8w@mail.gmail.com>
To: Cameron McCormack <cam@mcc.id.au>
Cc: Boris Zbarsky <bzbarsky@mit.edu>, whatwg <whatwg@lists.whatwg.org>, www-svg <www-svg@w3.org>, Ian Hickson <ian@hixie.ch>
On Wed, May 2, 2012 at 5:31 PM, Cameron McCormack <cam@mcc.id.au> wrote:

> 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.

Who would do this in the current SVG world? As you say, (!elt.className)
would always return false...
Are you worried that new content won't work with an old viewer?

Received on Thursday, 3 May 2012 00:43:28 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 22:54:34 UTC