Skip to content

Commit

Permalink
[giow] (2) Make blank <iframe>s fire 'load' events when created.
Browse files Browse the repository at this point in the history
Fixing http://www.w3.org/Bugs/Public/show_bug.cgi?id=8837

git-svn-id: http://svn.whatwg.org/webapps@4772 340c8d12-0b0e-0410-8428-c7bf67bfef74
  • Loading branch information
Hixie committed Feb 18, 2010
1 parent e875bed commit d6d6dd8
Show file tree
Hide file tree
Showing 3 changed files with 91 additions and 20 deletions.
37 changes: 30 additions & 7 deletions complete.html
Expand Up @@ -19881,33 +19881,52 @@ <h4 id=the-iframe-element><span class=secno>4.8.2 </span>The <dfn><code>iframe</
<code><a href=#about:srcdoc>about:srcdoc</a></code>, and whose data consists of the value of
the attribute.</dd>

<dt>Otherwise, if the <code title=attr-iframe-src><a href=#attr-iframe-src>src</a></code>
<dt>If the <code title=attr-iframe-src><a href=#attr-iframe-src>src</a></code>
attribute is specified but the <code title=attr-iframe-srcdoc><a href=#attr-iframe-srcdoc>srcdoc</a></code> attribute is not</dt>

<dd>

<ol><!--
<li><p>If the value of the <code
title="attr-iframe-src">src</code> attribute is the empty string,
and the user agent is processing this <code>iframe</code>'s
attributes for the first time, then abort these steps.</p></li>
jump to the <i title="">empty</i> step below.</p></li>
--><li><p><a href=#resolve-a-url title="resolve a url">Resolve</a> the value of
the <code title=attr-iframe-src><a href=#attr-iframe-src>src</a></code> attribute, relative
to the <code><a href=#the-iframe-element>iframe</a></code> element.</li>

<li><p>If that is not successful, abort these steps.</li>
<li><p>If that is not successful, then jump to the <i title="">empty</i> step below.</li>

<li><p>If the resulting <a href=#absolute-url>absolute URL</a> is an
<a href=#ascii-case-insensitive>ASCII case-insensitive</a> match for the string
"<code><a href=#about:blank>about:blank</a></code>", and the user agent is processing this
<code><a href=#the-iframe-element>iframe</a></code>'s attributes for the first time, then abort
these steps.</li>
<code><a href=#the-iframe-element>iframe</a></code>'s attributes for the first time, then jump to
the <i title="">empty</i> step below. (In cases other than the
first time, <code><a href=#about:blank>about:blank</a></code> is loaded
normally.)</li>

<li><p><a href=#navigate>Navigate</a> the element's <a href=#browsing-context>browsing
context</a> to the resulting <a href=#absolute-url>absolute
URL</a>.</li>

</ol></dd>
</ol><p><i>Empty:</i> When the steps above require the user agent to
jump to the <i title="">empty</i> step, if the user agent is
processing this <code><a href=#the-iframe-element>iframe</a></code>'s attributes for the first
time, then the user agent must <a href=#queue-a-task>queue a task</a> to
<a href=#fire-a-simple-event>fire a simple event</a> named <code title=event-load>load</code> at the <code><a href=#the-iframe-element>iframe</a></code>
element. (After jumping to this step, the above steps are not
resumed.)</p>

</dd>

<dt>Otherwise</dt>

<dd>

<p><a href=#queue-a-task>Queue a task</a> to <a href=#fire-a-simple-event>fire a simple event</a>
named <code title=event-load>load</code> at the
<code><a href=#the-iframe-element>iframe</a></code> element.</p>

</dd>

</dl><p>Any <a href=#navigate title=navigate>navigation</a> required of the user
agent in the <a href=#process-the-iframe-attributes>process the <code>iframe</code> attributes</a>
Expand Down Expand Up @@ -20015,6 +20034,10 @@ <h4 id=the-iframe-element><span class=secno>4.8.2 </span>The <dfn><code>iframe</
<p>The <a href=#task-source>task source</a> for these <a href=#concept-task title=concept-task>tasks</a> is the <a href=#dom-manipulation-task-source>DOM manipulation
task source</a>.</p>

<p class=note>A <code title=event-load>load</code> event is also
fired at the <code><a href=#the-iframe-element>iframe</a></code> element when it is created if no
other data is loaded in it.</p>

<p>When there is an <a href=#active-parser>active parser</a> in the
<code><a href=#the-iframe-element>iframe</a></code>, and when anything in the <code><a href=#the-iframe-element>iframe</a></code> is
<a href=#delay-the-load-event title="delay the load event">delaying the load event</a> of
Expand Down
37 changes: 30 additions & 7 deletions index
Expand Up @@ -19780,33 +19780,52 @@ href="?audio"&gt;audio&lt;/a&gt; test instead.)&lt;/p&gt;</pre>
<code><a href=#about:srcdoc>about:srcdoc</a></code>, and whose data consists of the value of
the attribute.</dd>

<dt>Otherwise, if the <code title=attr-iframe-src><a href=#attr-iframe-src>src</a></code>
<dt>If the <code title=attr-iframe-src><a href=#attr-iframe-src>src</a></code>
attribute is specified but the <code title=attr-iframe-srcdoc><a href=#attr-iframe-srcdoc>srcdoc</a></code> attribute is not</dt>

<dd>

<ol><!--
<li><p>If the value of the <code
title="attr-iframe-src">src</code> attribute is the empty string,
and the user agent is processing this <code>iframe</code>'s
attributes for the first time, then abort these steps.</p></li>
jump to the <i title="">empty</i> step below.</p></li>
--><li><p><a href=#resolve-a-url title="resolve a url">Resolve</a> the value of
the <code title=attr-iframe-src><a href=#attr-iframe-src>src</a></code> attribute, relative
to the <code><a href=#the-iframe-element>iframe</a></code> element.</li>

<li><p>If that is not successful, abort these steps.</li>
<li><p>If that is not successful, then jump to the <i title="">empty</i> step below.</li>

<li><p>If the resulting <a href=#absolute-url>absolute URL</a> is an
<a href=#ascii-case-insensitive>ASCII case-insensitive</a> match for the string
"<code><a href=#about:blank>about:blank</a></code>", and the user agent is processing this
<code><a href=#the-iframe-element>iframe</a></code>'s attributes for the first time, then abort
these steps.</li>
<code><a href=#the-iframe-element>iframe</a></code>'s attributes for the first time, then jump to
the <i title="">empty</i> step below. (In cases other than the
first time, <code><a href=#about:blank>about:blank</a></code> is loaded
normally.)</li>

<li><p><a href=#navigate>Navigate</a> the element's <a href=#browsing-context>browsing
context</a> to the resulting <a href=#absolute-url>absolute
URL</a>.</li>

</ol></dd>
</ol><p><i>Empty:</i> When the steps above require the user agent to
jump to the <i title="">empty</i> step, if the user agent is
processing this <code><a href=#the-iframe-element>iframe</a></code>'s attributes for the first
time, then the user agent must <a href=#queue-a-task>queue a task</a> to
<a href=#fire-a-simple-event>fire a simple event</a> named <code title=event-load>load</code> at the <code><a href=#the-iframe-element>iframe</a></code>
element. (After jumping to this step, the above steps are not
resumed.)</p>

</dd>

<dt>Otherwise</dt>

<dd>

<p><a href=#queue-a-task>Queue a task</a> to <a href=#fire-a-simple-event>fire a simple event</a>
named <code title=event-load>load</code> at the
<code><a href=#the-iframe-element>iframe</a></code> element.</p>

</dd>

</dl><p>Any <a href=#navigate title=navigate>navigation</a> required of the user
agent in the <a href=#process-the-iframe-attributes>process the <code>iframe</code> attributes</a>
Expand Down Expand Up @@ -19914,6 +19933,10 @@ href="?audio"&gt;audio&lt;/a&gt; test instead.)&lt;/p&gt;</pre>
<p>The <a href=#task-source>task source</a> for these <a href=#concept-task title=concept-task>tasks</a> is the <a href=#dom-manipulation-task-source>DOM manipulation
task source</a>.</p>

<p class=note>A <code title=event-load>load</code> event is also
fired at the <code><a href=#the-iframe-element>iframe</a></code> element when it is created if no
other data is loaded in it.</p>

<p>When there is an <a href=#active-parser>active parser</a> in the
<code><a href=#the-iframe-element>iframe</a></code>, and when anything in the <code><a href=#the-iframe-element>iframe</a></code> is
<a href=#delay-the-load-event title="delay the load event">delaying the load event</a> of
Expand Down
37 changes: 31 additions & 6 deletions source
Expand Up @@ -21119,7 +21119,7 @@ href="?audio">audio&lt;/a> test instead.)&lt;/p></pre>
<code>about:srcdoc</code>, and whose data consists of the value of
the attribute.</p></dd>

<dt>Otherwise, if the <code title="attr-iframe-src">src</code>
<dt>If the <code title="attr-iframe-src">src</code>
attribute is specified but the <code
title="attr-iframe-srcdoc">srcdoc</code> attribute is not</dt>

Expand All @@ -21130,28 +21130,49 @@ href="?audio">audio&lt;/a> test instead.)&lt;/p></pre>
<!--
<li><p>If the value of the <code
title="attr-iframe-src">src</code> attribute is the empty string,
and the user agent is processing this <code>iframe</code>'s
attributes for the first time, then abort these steps.</p></li>
jump to the <i title="">empty</i> step below.</p></li>
-->

<li><p><span title="resolve a url">Resolve</span> the value of
the <code title="attr-iframe-src">src</code> attribute, relative
to the <code>iframe</code> element.</p></li>

<li><p>If that is not successful, abort these steps.</p></li>
<li><p>If that is not successful, then jump to the <i
title="">empty</i> step below.</p></li>

<li><p>If the resulting <span>absolute URL</span> is an
<span>ASCII case-insensitive</span> match for the string
"<code>about:blank</code>", and the user agent is processing this
<code>iframe</code>'s attributes for the first time, then abort
these steps.</p></li>
<code>iframe</code>'s attributes for the first time, then jump to
the <i title="">empty</i> step below. (In cases other than the
first time, <code>about:blank</code> is loaded
normally.)</p></li>

<li><p><span>Navigate</span> the element's <span>browsing
context</span> to the resulting <span>absolute
URL</span>.</p></li>

</ol>

<p><i>Empty:</i> When the steps above require the user agent to
jump to the <i title="">empty</i> step, if the user agent is
processing this <code>iframe</code>'s attributes for the first
time, then the user agent must <span>queue a task</span> to
<span>fire a simple event</span> named <code
title="event-load">load</code> at the <code>iframe</code>
element. (After jumping to this step, the above steps are not
resumed.)</p>

</dd>

<dt>Otherwise</dt>

<dd>

<p><span>Queue a task</span> to <span>fire a simple event</span>
named <code title="event-load">load</code> at the
<code>iframe</code> element.</p>

</dd>

</dl>
Expand Down Expand Up @@ -21274,6 +21295,10 @@ href="?audio">audio&lt;/a> test instead.)&lt;/p></pre>
title="concept-task">tasks</span> is the <span>DOM manipulation
task source</span>.</p>

<p class="note">A <code title="event-load">load</code> event is also
fired at the <code>iframe</code> element when it is created if no
other data is loaded in it.</p>

<p>When there is an <span>active parser</span> in the
<code>iframe</code>, and when anything in the <code>iframe</code> is
<span title="delay the load event">delaying the load event</span> of
Expand Down

0 comments on commit d6d6dd8

Please sign in to comment.