ACTION-3549: SVGLoad -> load.
authorErik Dahlstrom <ed@opera.com>
Tue, 19 Nov 2013 13:31:19 +0100
changeset 557 2e94d1cf7f52
parent 554 e6728ebbe0ca
child 558 49116d54b822
ACTION-3549: SVGLoad -> load.

Fire load events only on the root svg (window proxy),
and on elements with external content: image and script.
master/definitions.xml
master/interact.html
master/intro.html
master/struct.html
--- a/master/definitions.xml	Mon Nov 18 15:28:14 2013 +0100
+++ b/master/definitions.xml	Tue Nov 19 13:31:19 2013 +0100
@@ -782,6 +782,7 @@
   <elementcategory name='structural' href='intro.html#TermStructuralElement' elements='defs, g, svg, symbol, use'/>
   <elementcategory name='text content' href='intro.html#TermTextContentElement' elements='text, tspan, tref, textPath, altGlyph'/>
   <elementcategory name='text content child' href='intro.html#TermTextContentChildElement' elements='tspan, tref, textPath, altGlyph'/>
+  <elementcategory name='structurally external' elements='script, image'/> <!-- possibly add later: iframe, video, audio, foreignObject(if it has xlink:href) -->
 
   <!-- ... attributes common to multiple elements ........................ -->
 
@@ -1351,6 +1352,7 @@
   <term name='SVG user agent' href='intro.html#TermUserAgent'/>
   <term name='SVG user agents' href='intro.html#TermUserAgent'/>
   <term name='SVG viewport' href='intro.html#TermSVGViewport'/>
+  <term name='structurally external elements' href='intro.html#TermStructurallyExternalElement'/>
   <term name='transformation' href='intro.html#TermTransformation'/>
   <term name='transformations' href='intro.html#TermTransformation'/>
   <term name='transformation matrix' href='intro.html#TermTransformationMatrix'/>
--- a/master/interact.html	Mon Nov 18 15:28:14 2013 +0100
+++ b/master/interact.html	Tue Nov 19 13:31:19 2013 +0100
@@ -348,19 +348,27 @@
         href="script.html#OnMouseOutEventAttribute">onmouseout</a></td>
       </tr>
       <tr>
-        <td id="LoadEvent"><p class="event-name"><strong>SVGLoad</strong></p>
-          <p>The event is triggered at the point at which the user
-          agent has fully parsed the element and its descendants and
-          is ready to act appropriately upon that element, such as
-          being ready to render the element to the target device.
-          Referenced external resources that are required must be loaded,
-          parsed and ready to render before the event is triggered.
-          Optional external resources are not required to be ready
-          for the event to be triggered.</p>
-	  <p class="issue">Now that <span class="attr-name">'externalResourcesRequired'</span>
-	  has been removed, we need to have better wording for
-	  when SVGLoad is dispatched.</p>
-          <p>SVGLoad events do not bubble and are not cancelable.</p>
+        <td id="LoadEvent"><p class="event-name"><strong>load</strong></p>
+          <p>
+          The load event is dispatched only to <a>structurally external elements</a> and to the
+          <a>Window</a>, when the corresponding external resources have finished loading. Note that
+          due to it's <a href="struct.html#SVGElementEventHandlerAttributes">relationship</a> with <a>Window</a>
+          the load event on <a>'svg'</a> elements is only dispatched when all resources in the document
+          have been completely loaded.
+          </p>
+
+          <p>The load event and the error event on
+          <a>structurally external elements</a> are mutually exclusive, 
+          only one of these events must be dispatched when
+          processing the element in question.</p>
+
+          <p>load events do not bubble and are not cancelable.</p>
+
+          <p class="note">In previous SVG specifications the load event
+          was called SVGLoad and could be dispatched immidiately after
+          parsing an element but before the related resource(s) were
+          fully loaded.</p>
+
         </td>
         <td>(same)</td>
         <td>none</td>
--- a/master/intro.html	Mon Nov 18 15:28:14 2013 +0100
+++ b/master/intro.html	Tue Nov 19 13:31:19 2013 +0100
@@ -576,6 +576,12 @@
   elements are structural elements:
   <edit:elementcategory name='structural'/>.</dd>
 
+  <dt id="TermStructurallyExternalElement">structurally external element</dt>
+  <dd>Elements that define its structure by reference to an external resource.
+  Specifically, the following elements are structurally external elements when
+  they have an <span class="attr-name">'xlink:href'</span> attribute:
+  <edit:elementcategory name='structurally external'/>.</dd>
+
   <dt id="TermSVGCanvas">SVG canvas</dt>
   <dd>The <a>canvas</a> onto which the SVG
   content is rendered. See the discussion of the
--- a/master/struct.html	Mon Nov 18 15:28:14 2013 +0100
+++ b/master/struct.html	Tue Nov 19 13:31:19 2013 +0100
@@ -540,7 +540,7 @@
 referenced document. This attribute provides a convenient way to design
 SVG documents to scale-to-fit into an arbitrary viewport.</p>
 
-<p>The <a>'svg'</a> element exposes as <a>event handler content attributes</a> a number of the <a>event handlers</a> of the <a>Window</a> object. It also mirrors their <a>event handler IDL attributes</a>.</p>
+<p id="SVGElementEventHandlerAttributes">The <a>'svg'</a> element exposes as <a>event handler content attributes</a> a number of the <a>event handlers</a> of the <a>Window</a> object. It also mirrors their <a>event handler IDL attributes</a>.</p>
 
 <p>The <a>onblur</a>, <a>onerror</a>, <a>onfocus</a>, <a>onload</a>, and <a>onscroll</a> <a>event handlers</a> of the <a>Window</a> object, exposed on the <a>'svg'</a> element,
 replace the generic <a>event handlers</a> with the same names normally supported by <a>SVG elements</a>.</p>