[whatwg] Should onfoo event handler properties be on Element or HTMLElement?
ed at opera.com
Wed Jan 22 06:06:25 PST 2014
On Tue, 08 Oct 2013 20:21:08 +0200, Boris Zbarsky <bzbarsky at mit.edu> wrote:
> On 10/8/13 9:49 AM, Philip Jägenstedt wrote:
>> Gecko has "HTMLElement implements GlobalEventHandlers" in its IDL,
>> but somewhat surprisingly also "SVGElement implements
> Note that in Gecko SVG elements also have event handler content
> attributes and whatnot.
> What's your proposed handling of event handler content attributes? And
> note that the handling of these is not quite identical for HTML and SVG
> last I checked. :(
There are a couple of events in SVG which seem to be in conflict with the
The events with names: "endEvent", "beginEvent" and "repeatEvent" . The
attributes that correspond to these are "onend", "onbegin" and "onrepeat"
respectively. Due to how the event-value syntax works in SVG animation
elements the event names can't be changed without conflicting with the
sync-base value syntax.
I wish the event names were consistent with the pattern used for event
handler content attributes, but they're not.
In SVG2 most of the events with "SVG" event name prefixes have been
removed, e.g "SVGLoad" is now a plain "load", which means they follow
the pattern for event handler content attributes.
SVGResize, SVGScroll and SVGZoom still remain to be fixed in the spec. Of
these only SVGZoom lacks an existing unprefixed counterpart, so that would
be a possible addition to GlobalEventHandlers with the event name "zoom".
My question is: what should be done with the SVG specific event handlers?
Should they be added to GlobalEventHandlers, or should they be just on
This was ACTION-3542 (SVG WG).
Erik Dahlstrom, Web Technology Developer, Opera Software
Co-Chair, W3C SVG Working Group
More information about the whatwg