W3C home > Mailing lists > Public > www-svg@w3.org > March 2010

Questions about events

From: Patrick Dengler <patd@microsoft.com>
Date: Wed, 24 Mar 2010 11:06:48 +0000
To: www-svg <www-svg@w3.org>
Message-ID: <4A2DB3AE4504E944AF122BBFBA7FBA1F4E7A22E6@TK5EX14MBXC112.redmond.corp.microsoft.com>
We are finding more implementation differences across browsers on events, which leads us to believe that we need to tighten the language here.  We could use some clarification on the following:

onabort:  we think this should fire the user presses a 'stop' button when loading an SVG document.  Are there any other cases?

onunload: what is the expected behavior here when there are multiple <svg> fragments in an XHTML/HTML document?


Case 1:
<svg id = "a" />

"a" has no children. As soon as "a" has finished parsing, it should fire SVGLoad.

Case 2:
<svg id="a"> <g id="b"/> </svg>

"a" has a child that does not have an external resource. As soon as "b" has finished parsing it will fire SVGLoad. When "a" has finished parsing, it also fires SVGLoad since none of its children told it to wait. 

Case 3:
<svg id="a"><image id="b" /> </svg>

"b" has an external resource. When "b" finishes parsing, it tells all of its ancestors to wait. When "b" loads its image, and when it finishes loading, fires SVGLoad. It then fires SVGLoad on ancestors.

The following cases occur when the tree is modified before the image resources are loaded.

Case 4:
<svg id="a"> <image id="b" /> </svg>

After parsing, but before "b" loads its resource, "b" is removed from the child list of "a" leaving:

<svg id="a"> </svg>

"a" fires SVGLoad.

Case 5:
<svg id="a"> <image id="b" /> </svg>

After parsing, but before "b" loads its resource, unloaded image "c" is added to the child list of "a".

<svg id="a"> <image id="b" /> <image id="c" /> </svg>

"b" and "c" eventually load, fire their events, and then "a" fires.

Case 6:
<svg id="a" />

"a" fires SVGLoad on parse then an unloaded image is added to it.

<svg id="a"> <image id="b" /> </svg>

"a" has already fired so it ignores that request. "b" eventually loads and fires SVGLoad. Again it notifies "a", but "a" does not fire again.

Your help is appreciated,

Received on Wednesday, 24 March 2010 11:09:25 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 8 March 2017 09:47:20 UTC