[html5] r1613 - /

whatwg at whatwg.org whatwg at whatwg.org
Wed May 14 01:02:54 PDT 2008


Author: ianh
Date: 2008-05-14 01:02:53 -0700 (Wed, 14 May 2008)
New Revision: 1613

Modified:
   index
   source
Log:
[] (0) Fire 'load' events on <script> after running the script, not before.

Modified: index
===================================================================
--- index	2008-05-14 07:56:37 UTC (rev 1612)
+++ index	2008-05-14 08:02:53 UTC (rev 1613)
@@ -22936,61 +22936,68 @@
    <dt>If the load was successful
 
    <dd>
-    <p>First the user agent must <a href="#firing4">fire a <code
-     title=event-load>load</code> event</a> at the element, and then, if <a
-     href="#scripting2">scripting is enabled</a>, and the
-     <code>Document</code> does not have <code
-     title=dom-document-designMode><a
-     href="#designMode">designMode</a></code> enabled, and the
-     <code>Document</code> is the <a href="#active">active document</a> in
-     its <a href="#browsing1">browsing context</a>, the user agent must
-     execute the script:</p>
+    <ol>
+     <li>
+      <p>If <a href="#scripting2">scripting is enabled</a>, and the
+       <code>Document</code> does not have <code
+       title=dom-document-designMode><a
+       href="#designMode">designMode</a></code> enabled, and the
+       <code>Document</code> is the <a href="#active">active document</a> in
+       its <a href="#browsing1">browsing context</a>, the user agent must
+       execute the script:</p>
 
-    <dl class=switch>
-     <dt>If the script is from an external file
+      <dl class=switch>
+       <dt>If the script is from an external file
 
-     <dd>
-      <p>That file must be used as the file to execute.</p>
+       <dd>
+        <p>That file must be used as the file to execute.</p>
 
-      <p>The file must be interpreted using the character encoding given by
-       <var><a href="#the-scripts0">the script's character
-       encoding</a></var>, regardless of any metadata given by the file's <a
-       href="#content-type8" title=Content-Type>Content-Type metadata</a>.</p>
+        <p>The file must be interpreted using the character encoding given by
+         <var><a href="#the-scripts0">the script's character
+         encoding</a></var>, regardless of any metadata given by the file's
+         <a href="#content-type8" title=Content-Type>Content-Type
+         metadata</a>.</p>
 
-      <p class=big-issue>This means that a UTF-16 document will always assume
-       external scripts are UTF-16...? This applies, e.g., to document's
-       created using createDocument()... It also means changing
-       document.charSet will affect the character encoding used to interpret
-       scripts, is that really what happens?</p>
+        <p class=big-issue>This means that a UTF-16 document will always
+         assume external scripts are UTF-16...? This applies, e.g., to
+         document's created using createDocument()... It also means changing
+         document.charSet will affect the character encoding used to
+         interpret scripts, is that really what happens?</p>
 
-     <dt>If the script is inline
+       <dt>If the script is inline
 
-     <dd>
-      <p>For scripting languages that consist of pure text, user agents must
-       use the value of the DOM <code title=dom-script-text><a
-       href="#text1">text</a></code> attribute (defined below) as the script
-       to execute, and for XML-based scripting languages, user agents must
-       use all the child nodes of the <code><a
-       href="#script0">script</a></code> element as the script to execute.</p>
-    </dl>
+       <dd>
+        <p>For scripting languages that consist of pure text, user agents
+         must use the value of the DOM <code title=dom-script-text><a
+         href="#text1">text</a></code> attribute (defined below) as the
+         script to execute, and for XML-based scripting languages, user
+         agents must use all the child nodes of the <code><a
+         href="#script0">script</a></code> element as the script to execute.</p>
+      </dl>
 
-    <p>In any case, the user agent must execute the script according to the
-     semantics defined by the language associated with <var><a
-     href="#the-scripts">the script's type</a></var> (see the <a
-     href="#scriptingLanguages">scripting languages</a> section below).</p>
+      <p>In any case, the user agent must execute the script according to the
+       semantics defined by the language associated with <var><a
+       href="#the-scripts">the script's type</a></var> (see the <a
+       href="#scriptingLanguages">scripting languages</a> section below).</p>
 
-    <p>Scripts must be executed in the scope of the <a
-     href="#browsing1">browsing context</a> of the element's
-     <code>Document</code>.</p>
+      <p>Scripts must be executed in the scope of the <a
+       href="#browsing1">browsing context</a> of the element's
+       <code>Document</code>.</p>
 
-    <p class=note>The element's attributes' values might have changed between
-     when the element was inserted into the document and when the script has
-     finished loading, as may its other attributes; similarly, the element
-     itself might have been taken back out of the DOM, or had other changes
-     made. These changes do not in any way affect the above steps; only the
-     values of the attributes at the time the <code><a
-     href="#script0">script</a></code> element is first inserted into the
-     document matter.</p>
+      <p class=note>The element's attributes' values might have changed
+       between when the element was inserted into the document and when the
+       script has finished loading, as may its other attributes; similarly,
+       the element itself might have been taken back out of the DOM, or had
+       other changes made. These changes do not in any way affect the above
+       steps; only the values of the attributes at the time the <code><a
+       href="#script0">script</a></code> element is first inserted into the
+       document matter.</p>
+
+     <li>
+      <p>Then, the user agent must <a href="#firing4">fire a <code
+       title=event-load>load</code> event</a> at the <code><a
+       href="#script0">script</a></code> element.</p>
+    </ol>
   </dl>
 
   <p>The DOM attributes <dfn id=src10

Modified: source
===================================================================
--- source	2008-05-14 07:56:37 UTC (rev 1612)
+++ source	2008-05-14 08:02:53 UTC (rev 1613)
@@ -20854,69 +20854,83 @@
 
    <dd>
 
-    <p>First the user agent must <span>fire a <code
-    title="event-load">load</code> event</span> at the element, and
-    then, if <span>scripting is enabled</span>, and the
-    <code>Document</code> does not have <code
-    title="dom-document-designMode">designMode</code> enabled, and the
-    <code>Document</code> is the <span>active document</span> in its
-    <span>browsing context</span>, the user agent must execute the
-    script:</p>
+    <ol>
 
-    <dl class="switch">
+     <li>
 
-     <dt>If the script is from an external file</dt>
+      <p>If <span>scripting is enabled</span>, and the
+      <code>Document</code> does not have <code
+      title="dom-document-designMode">designMode</code> enabled, and the
+      <code>Document</code> is the <span>active document</span> in its
+      <span>browsing context</span>, the user agent must execute the
+      script:</p>
 
-     <dd>
+      <dl class="switch">
 
-      <p>That file must be used as the file to execute.</p>
+       <dt>If the script is from an external file</dt>
 
-      <p>The file must be interpreted using the character encoding
-      given by <var>the script's character encoding</var>, regardless
-      of any metadata given by the file's <span
-      title="Content-Type">Content-Type metadata</span>.</p>
+       <dd>
 
-      <p class="big-issue">This means that a UTF-16 document will
-      always assume external scripts are UTF-16...? This applies,
-      e.g., to document's created using createDocument()... It also
-      means changing document.charSet will affect the character
-      encoding used to interpret scripts, is that really what
-      happens?</p>
+        <p>That file must be used as the file to execute.</p>
 
-     </dd>
+        <p>The file must be interpreted using the character encoding
+        given by <var>the script's character encoding</var>, regardless
+        of any metadata given by the file's <span
+        title="Content-Type">Content-Type metadata</span>.</p>
 
-     <dt>If the script is inline</dt>
+        <p class="big-issue">This means that a UTF-16 document will
+        always assume external scripts are UTF-16...? This applies,
+        e.g., to document's created using createDocument()... It also
+        means changing document.charSet will affect the character
+        encoding used to interpret scripts, is that really what
+        happens?</p>
 
-     <dd>
+       </dd>
 
-      <p>For scripting languages that consist of pure text, user
-      agents must use the value of the DOM <code
-      title="dom-script-text">text</code> attribute (defined below) as
-      the script to execute, and for XML-based scripting languages,
-      user agents must use all the child nodes of the
-      <code>script</code> element as the script to execute.</p>
+       <dt>If the script is inline</dt>
 
-     </dd>
+       <dd>
 
-    </dl>
+        <p>For scripting languages that consist of pure text, user
+        agents must use the value of the DOM <code
+        title="dom-script-text">text</code> attribute (defined below) as
+        the script to execute, and for XML-based scripting languages,
+        user agents must use all the child nodes of the
+        <code>script</code> element as the script to execute.</p>
 
-    <p>In any case, the user agent must execute the script according to
-    the semantics defined by the language associated with <var>the
-    script's type</var> (see the <a href="#scriptingLanguages">scripting
-    languages</a> section below).</p>
+       </dd>
 
-    <p>Scripts must be executed in the scope of the <span>browsing
-    context</span> of the element's <code>Document</code>.</p>
+      </dl>
 
-    <p class="note">The element's attributes' values might have changed
-    between when the element was inserted into the document and when the
-    script has finished loading, as may its other attributes; similarly,
-    the element itself might have been taken back out of the DOM, or had
-    other changes made. These changes do not in any way affect the above
-    steps; only the values of the attributes at the time the
-    <code>script</code> element is first inserted into the document
-    matter.</p>
+      <p>In any case, the user agent must execute the script according to
+      the semantics defined by the language associated with <var>the
+      script's type</var> (see the <a href="#scriptingLanguages">scripting
+      languages</a> section below).</p>
 
+      <p>Scripts must be executed in the scope of the <span>browsing
+      context</span> of the element's <code>Document</code>.</p>
+
+      <p class="note">The element's attributes' values might have changed
+      between when the element was inserted into the document and when the
+      script has finished loading, as may its other attributes; similarly,
+      the element itself might have been taken back out of the DOM, or had
+      other changes made. These changes do not in any way affect the above
+      steps; only the values of the attributes at the time the
+      <code>script</code> element is first inserted into the document
+      matter.</p>
+
+     </li>
+
+     <li>
+
+      <p>Then, the user agent must <span>fire a <code
+      title="event-load">load</code> event</span> at the
+      <code>script</code> element.</p>
+
+     </li>
+
+    </ol>
+
    </dd>
 
   </dl>




More information about the Commit-Watchers mailing list