W3C home > Mailing lists > Public > public-svg-wg@w3.org > January to March 2009

Re: ISSUE-2254 (load-event-dispatching): Consider changing which elements have load dispatched to them [SVG Core 2.0]

From: Erik Dahlström <ed@opera.com>
Date: Mon, 30 Mar 2009 10:23:21 +0200
To: "SVG Working Group WG" <public-svg-wg@w3.org>
Message-ID: <op.urliw7glgqiacl@gnorps.linkoping.osa>
On Mon, 30 Mar 2009 05:45:57 +0200, SVG Working Group Issue Tracker <sysbot+tracker@w3.org> wrote:

> ISSUE-2254 (load-event-dispatching): Consider changing which elements have load dispatched to them [SVG Core 2.0]
> http://www.w3.org/Graphics/SVG/WG/track/issues/2254
> Raised by: Cameron McCormack
> On product: SVG Core 2.0
> The load event in SVG is somewhat different from the one in SVG.  In HTML, load is only dispatched at <img> elements, when their image has loaded, and at the Window object (and thus captured by <body onload="">).  In SVG, *every* element gets a load event dispatched to it.  The spec isn't clear about when exactly load events are dispatched.  We could consider aligning with HTML here, perhaps firing only on <svg:image> and the root <svg:svg> element.  I think testing is needed to see what implementations actually do with the load event at the moment.

In html 'load' is dispatched on other elements that can reference external resources too, like <iframe>, <object>, <script>, <embed>, <audio>, <video> (possibly this is not the full list of such elements).

So it would make sense to at least have 'load' for the elements in SVG that can have external references:
<use>, <image>, <animation>, <foreignObject>, <audio>, <video>, <prefetch>, <script>, <handler>, <font-face-uri>, <mpath>, <tref>, <textPath>, <altGlyph>, <glyphRef>, <cursor>, (<definition-src>, <color-profile>)

The last two can have external references, but I'm not sure about the CSS status for them at the moment, if there's no support in CSS for them (or CSS decides to drop them) then there's less point in having them since the normative definitions are in CSS.

I'd be very surprised if there was svg content that relied on getting 'load' / 'SVGLoad' events for something that wasn't either the root <svg> element or something that had an external reference.


Erik Dahlstrom, Core Technology Developer, Opera Software
Co-Chair, W3C SVG Working Group
Personal blog: http://my.opera.com/macdev_ed
Received on Monday, 30 March 2009 08:25:58 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:20:10 UTC