[html5] r2795 - [giow] (2) Make it possible to change a <script>'s text nodes or set its src='' [...]

whatwg at whatwg.org whatwg at whatwg.org
Wed Feb 11 17:21:29 PST 2009


Author: ianh
Date: 2009-02-11 17:21:28 -0800 (Wed, 11 Feb 2009)
New Revision: 2795

Modified:
   index
   source
Log:
[giow] (2) Make it possible to change a <script>'s text nodes or set its src='' attribute if it hasn't yet executed.

Modified: index
===================================================================
--- index	2009-02-11 23:31:43 UTC (rev 2794)
+++ index	2009-02-12 01:21:28 UTC (rev 2795)
@@ -34,7 +34,7 @@
   <div class=head>
    <p><a class=logo href=http://www.whatwg.org/ rel=home><img alt=WHATWG src=/images/logo></a></p>
    <h1>HTML 5</h1>
-   <h2 class="no-num no-toc" id=draft-recommendation-—-date:-01-jan-1901>Draft Recommendation — 11 February 2009</h2>
+   <h2 class="no-num no-toc" id=draft-recommendation-—-date:-01-jan-1901>Draft Recommendation — 12 February 2009</h2>
    <p>You can take part in this work. <a href=http://www.whatwg.org/mailing-list>Join the working group's discussion list.</a></p>
    <p><strong>Web designers!</strong> We have a <a href=http://blog.whatwg.org/faq/>FAQ</a>, a <a href=http://forums.whatwg.org/>forum</a>, and a <a href=http://www.whatwg.org/mailing-list#help>help mailing list</a> for you!</p>
    <dl><dt>Multiple-page version:</dt>
@@ -9963,14 +9963,21 @@
   encoding</var></dfn>. They are determined when the script is run,
   based on the attributes on the element at that time.</p>
 
-  <p>When a <code><a href=#script>script</a></code> element that is marked as neither
-  having <a href=#already-executed>"already executed"</a> nor being
-  <a href=#parser-inserted>"parser-inserted"</a> is <a href=#insert-an-element-into-a-document title="insert an element
-  into a document">inserted into a document</a>, the user agent
-  must <a href=#running-a-script title="running a script">run</a> the
-  <code><a href=#script>script</a></code> element.</p>
+  <p>When a <code><a href=#script>script</a></code> element that is neither marked as
+  having <a href=#already-executed>"already executed"</a> nor marked as being
+  <a href=#parser-inserted>"parser-inserted"</a> experiences one of the events listed
+  in the following list, the user agent must <a href=#running-a-script title="running a
+  script">run</a> the <code><a href=#script>script</a></code> element:</p>
 
-  <p><dfn id=running-a-script title="running a script">Running a script</dfn>: When a
+  <ul><li>The <code><a href=#script>script</a></code> element gets <a href=#insert-an-element-into-a-document title="insert an
+   element into a document">inserted into a document</a>.</li>
+
+   <li>The <code><a href=#script>script</a></code> element's child nodes are changed.</li>
+
+   <li>The <code><a href=#script>script</a></code> element has a <code title=attr-script-src><a href=#attr-script-src>src</a></code> attribute set where previously
+   the elment had no such attribute.</li>
+
+  </ul><p><dfn id=running-a-script title="running a script">Running a script</dfn>: When a
   <code><a href=#script>script</a></code> element is to be run, the user agent must act as
   follows:</p>
 
@@ -10029,6 +10036,16 @@
 
    <li>
 
+    <p>If the element has no <code title=attr-script-src><a href=#attr-script-src>src</a></code>
+    attribute, and its child nodes consist only of comment nodes and
+    empty <a href=#text-node title="text node">text nodes</a>, then the user
+    agent must abort these steps at this point. The script is not
+    executed.</p>
+
+   </li>
+
+   <li>
+
     <p>The user agent must set the element's <a href=#already-executed>"already
     executed"</a> flag.</p>
 

Modified: source
===================================================================
--- source	2009-02-11 23:31:43 UTC (rev 2794)
+++ source	2009-02-12 01:21:28 UTC (rev 2795)
@@ -10440,13 +10440,25 @@
   encoding</var></dfn>. They are determined when the script is run,
   based on the attributes on the element at that time.</p>
 
-  <p>When a <code>script</code> element that is marked as neither
-  having <span>"already executed"</span> nor being
-  <span>"parser-inserted"</span> is <span title="insert an element
-  into a document">inserted into a document</span>, the user agent
-  must <span title="running a script">run</span> the
-  <code>script</code> element.</p>
+  <p>When a <code>script</code> element that is neither marked as
+  having <span>"already executed"</span> nor marked as being
+  <span>"parser-inserted"</span> experiences one of the events listed
+  in the following list, the user agent must <span title="running a
+  script">run</span> the <code>script</code> element:</p>
 
+  <ul>
+
+   <li>The <code>script</code> element gets <span title="insert an
+   element into a document">inserted into a document</span>.</li>
+
+   <li>The <code>script</code> element's child nodes are changed.</li>
+
+   <li>The <code>script</code> element has a <code
+   title="attr-script-src">src</code> attribute set where previously
+   the elment had no such attribute.</li>
+
+  </ul>
+
   <p><dfn title="running a script">Running a script</dfn>: When a
   <code>script</code> element is to be run, the user agent must act as
   follows:</p>
@@ -10527,6 +10539,16 @@
 
    <li>
 
+    <p>If the element has no <code title="attr-script-src">src</code>
+    attribute, and its child nodes consist only of comment nodes and
+    empty <span title="text node">text nodes</span>, then the user
+    agent must abort these steps at this point. The script is not
+    executed.</p>
+
+   </li>
+
+   <li>
+
     <p>The user agent must set the element's <span>"already
     executed"</span> flag.</p>
 




More information about the Commit-Watchers mailing list