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

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.

Cheers
/Erik

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