Re: [whatwg] Should onfoo event handler properties be on Element or HTMLElement?

2013-10-09 Thread Erik Dahlstrom
On Wed, 09 Oct 2013 10:53:29 +0200, Philip Jägenstedt phil...@opera.com  
wrote:


...

OK, I hadn't considered that moving this to Element would imply the
content attributes being reflected for all namespaces. Even though
Blink has the IDL attributes on Element, it looks like the reflection
with the content attributes only works for HTMLElement and SVGElement.
In other words, whatever Blink does doesn't look like something
worth standardizing.

Erik, does going with SVGElement implements GlobalEventHandlers
(like Gecko) seems like a way forward for the SVG spec?

Philip


Given the reasons brought up in this thread I should think that the WG  
would agree that SVGElement implements GlobalEventHandlers is an  
acceptable way forward.



--
Erik Dahlstrom, Core Technology Developer, Opera Software
Co-Chair, W3C SVG Working Group
Personal blog: http://my.opera.com/macdev_ed


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

2012-05-04 Thread Erik Dahlstrom
On Thu, 03 May 2012 02:31:40 +0200, Cameron McCormack c...@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.


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.


--
Erik Dahlstrom, Core Technology Developer, Opera Software
Co-Chair, W3C SVG Working Group
Personal blog: http://my.opera.com/macdev_ed