Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
[giow] (2) Make it possible to change a <script>'s text nodes or set …
…its src='' attribute if it hasn't yet executed.

git-svn-id: http://svn.whatwg.org/webapps@2795 340c8d12-0b0e-0410-8428-c7bf67bfef74
  • Loading branch information
Hixie committed Feb 12, 2009
1 parent e073173 commit 5ae073e
Show file tree
Hide file tree
Showing 2 changed files with 53 additions and 14 deletions.
33 changes: 25 additions & 8 deletions index
Expand Up @@ -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-&mdash;-date:-01-jan-1901>Draft Recommendation &mdash; 11 February 2009</h2>
<h2 class="no-num no-toc" id=draft-recommendation-&mdash;-date:-01-jan-1901>Draft Recommendation &mdash; 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>
Expand Down Expand Up @@ -9963,14 +9963,21 @@ people expect to have work and what is necessary.
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>

Expand Down Expand Up @@ -10027,6 +10034,16 @@ people expect to have work and what is necessary.

</li>

<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
Expand Down
34 changes: 28 additions & 6 deletions source
Expand Up @@ -10440,12 +10440,24 @@ people expect to have work and what is necessary.
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
Expand Down Expand Up @@ -10525,6 +10537,16 @@ people expect to have work and what is necessary.

</li>

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

0 comments on commit 5ae073e

Please sign in to comment.