Skip to content

Commit

Permalink
[giow] (2) Expand the hacks around <script for event> for extra compa…
Browse files Browse the repository at this point in the history
…tibility.

Fixing http://www.w3.org/Bugs/Public/show_bug.cgi?id=7851

git-svn-id: http://svn.whatwg.org/webapps@4938 340c8d12-0b0e-0410-8428-c7bf67bfef74
  • Loading branch information
Hixie committed Apr 1, 2010
1 parent 162d3fa commit 7c1d73b
Show file tree
Hide file tree
Showing 3 changed files with 77 additions and 12 deletions.
26 changes: 22 additions & 4 deletions complete.html
Expand Up @@ -3378,6 +3378,10 @@ <h4 id=common-parser-idioms><span class=secno>2.4.1 </span>Common parser idioms<
string, the user agent must remove any U+000A LINE FEED (LF) and
U+000D CARRIAGE RETURN (CR) characters from that string.</p>

<p>When a user agent is to <dfn id=strip-leading-and-trailing-whitespace>strip leading and trailing
whitespace</dfn> from a string, the user agent must remove all <a href=#space-character title="space character">space characters</a> that are at the
start or end of the string.</p>

<p>The <dfn id=code-point-length>code-point length</dfn> of a string is the number of
Unicode code points in that string.</p>

Expand Down Expand Up @@ -13442,11 +13446,25 @@ <h4 id=script><span class=secno>4.3.1 </span>The <dfn><code>script</code></dfn>

<li id=script-processing-for>

<p>If the <code><a href=#script>script</a></code> element has a <code title=attr-script-for><a href=#attr-script-for>for</a></code> attribute, then the user agent
must abort these steps at this point. The script is not
executed.</p>
<p>If the <code><a href=#script>script</a></code> element has an <code title=attr-script-event><a href=#attr-script-event>event</a></code> attribute and a <code title=attr-script-for><a href=#attr-script-for>for</a></code> attribute, then run these
substeps:</p>

</li>
<ol><li><p>Let <var title="">for</var> be the value of the <code title=attr-script-for><a href=#attr-script-for>for</a></code> attribute.</li>

<li><p>Let <var title="">event</var> be the value of the <code title=attr-script-event><a href=#attr-script-event>event</a></code> attribute.</li>

<li><p><a href=#strip-leading-and-trailing-whitespace>Strip leading and trailing whitespace</a> from
<var title="">event</var> and <var title="">for</var>.</li>

<li><p>If <var title="">for</var> is not an <a href=#ascii-case-insensitive>ASCII
case-insensitive</a> match for the string "<code title="">window</code>", then the user agent must abort these
steps at this point. The script is not executed.</li>

<li><p>If <var title="">event</var> is not an <a href=#ascii-case-insensitive>ASCII
case-insensitive</a> match for either the string "<code title="">onload</code>" or the string "<code title="">onload()</code>", then the user agent must abort these
steps at this point. The script is not executed.</li>

</ol></li>

<li id=script-processing-noscript>

Expand Down
26 changes: 22 additions & 4 deletions index
Expand Up @@ -3276,6 +3276,10 @@ a.setAttribute('href', 'http://example.com/'); // change the content attribute d
string, the user agent must remove any U+000A LINE FEED (LF) and
U+000D CARRIAGE RETURN (CR) characters from that string.</p>

<p>When a user agent is to <dfn id=strip-leading-and-trailing-whitespace>strip leading and trailing
whitespace</dfn> from a string, the user agent must remove all <a href=#space-character title="space character">space characters</a> that are at the
start or end of the string.</p>

<p>The <dfn id=code-point-length>code-point length</dfn> of a string is the number of
Unicode code points in that string.</p>

Expand Down Expand Up @@ -13340,11 +13344,25 @@ c-end = "--&gt;"</pre>

<li id=script-processing-for>

<p>If the <code><a href=#script>script</a></code> element has a <code title=attr-script-for><a href=#attr-script-for>for</a></code> attribute, then the user agent
must abort these steps at this point. The script is not
executed.</p>
<p>If the <code><a href=#script>script</a></code> element has an <code title=attr-script-event><a href=#attr-script-event>event</a></code> attribute and a <code title=attr-script-for><a href=#attr-script-for>for</a></code> attribute, then run these
substeps:</p>

</li>
<ol><li><p>Let <var title="">for</var> be the value of the <code title=attr-script-for><a href=#attr-script-for>for</a></code> attribute.</li>

<li><p>Let <var title="">event</var> be the value of the <code title=attr-script-event><a href=#attr-script-event>event</a></code> attribute.</li>

<li><p><a href=#strip-leading-and-trailing-whitespace>Strip leading and trailing whitespace</a> from
<var title="">event</var> and <var title="">for</var>.</li>

<li><p>If <var title="">for</var> is not an <a href=#ascii-case-insensitive>ASCII
case-insensitive</a> match for the string "<code title="">window</code>", then the user agent must abort these
steps at this point. The script is not executed.</li>

<li><p>If <var title="">event</var> is not an <a href=#ascii-case-insensitive>ASCII
case-insensitive</a> match for either the string "<code title="">onload</code>" or the string "<code title="">onload()</code>", then the user agent must abort these
steps at this point. The script is not executed.</li>

</ol></li>

<li id=script-processing-noscript>

Expand Down
37 changes: 33 additions & 4 deletions source
Expand Up @@ -2313,6 +2313,11 @@ a.setAttribute('href', 'http://example.com/'); // change the content attribute d
string, the user agent must remove any U+000A LINE FEED (LF) and
U+000D CARRIAGE RETURN (CR) characters from that string.</p>

<p>When a user agent is to <dfn>strip leading and trailing
whitespace</dfn> from a string, the user agent must remove all <span
title="space character">space characters</span> that are at the
start or end of the string.</p>

<p>The <dfn>code-point length</dfn> of a string is the number of
Unicode code points in that string.</p>

Expand Down Expand Up @@ -14099,10 +14104,34 @@ c-end = "-->"</pre>

<li id="script-processing-for">

<p>If the <code>script</code> element has a <code
title="attr-script-for">for</code> attribute, then the user agent
must abort these steps at this point. The script is not
executed.</p>
<p>If the <code>script</code> element has an <code
title="attr-script-event">event</code> attribute and a <code
title="attr-script-for">for</code> attribute, then run these
substeps:</p>

<ol>

<li><p>Let <var title="">for</var> be the value of the <code
title="attr-script-for">for</code> attribute.</p></li>

<li><p>Let <var title="">event</var> be the value of the <code
title="attr-script-event">event</code> attribute.</p></li>

<li><p><span>Strip leading and trailing whitespace</span> from
<var title="">event</var> and <var title="">for</var>.</p></li>

<li><p>If <var title="">for</var> is not an <span>ASCII
case-insensitive</span> match for the string "<code
title="">window</code>", then the user agent must abort these
steps at this point. The script is not executed.</p></li>

<li><p>If <var title="">event</var> is not an <span>ASCII
case-insensitive</span> match for either the string "<code
title="">onload</code>" or the string "<code
title="">onload()</code>", then the user agent must abort these
steps at this point. The script is not executed.</p></li>

</ol>

</li>

Expand Down

0 comments on commit 7c1d73b

Please sign in to comment.