Skip to content

Commit

Permalink
[agiowt] (3) load/error events on script elements; making various thi…
Browse files Browse the repository at this point in the history
…ngs delay the load event.

git-svn-id: http://svn.whatwg.org/webapps@645 340c8d12-0b0e-0410-8428-c7bf67bfef74
  • Loading branch information
Hixie committed Feb 28, 2007
1 parent 05fe3e2 commit 9c74faa
Show file tree
Hide file tree
Showing 2 changed files with 61 additions and 24 deletions.
43 changes: 29 additions & 14 deletions index
Original file line number Diff line number Diff line change
Expand Up @@ -11993,12 +11993,15 @@ brighter. A &lt;b>rat&lt;/b> scurries past the corner wall.&lt;/p></pre>
unless the user agent cannot support images, or its support for images has
been disabled.

<p>The download of the image must <a href="#delays">delay the <code
title=event-load>load</code> event</a>.

<p>Once the download has completed, if the image is a valid image, the user
agent must <a href="#firing4">fire a <code title=event-load>load</code>
event</a> on the <code><a href="#img0">img</a></code> element. If the
download fails or it completes but the image is not a valid or supported
image, the user agent must <a href="#firing5">fire an <code
title=event-load>error</code> event</a> on the <code><a
title=event-error>error</code> event</a> on the <code><a
href="#img0">img</a></code> element.

<p>The remote server's response metadata (e.g. an HTTP 404 status code, or
Expand Down Expand Up @@ -12143,6 +12146,9 @@ brighter. A &lt;b>rat&lt;/b> scurries past the corner wall.&lt;/p></pre>
when the element is created, or if the attribute is ever removed, is
<code>about:blank</code><!-- XXX xref -->.

<p>The download of the resource must <a href="#delays">delay the <code
title=event-load>load</code> event</a>.

<p>When content loads in an <code><a href="#iframe0">iframe</a></code>, the
user agent must <a href="#firing4">fire a <code
title=event-load>load</code> event</a> at the <code><a
Expand Down Expand Up @@ -12246,6 +12252,9 @@ brighter. A &lt;b>rat&lt;/b> scurries past the corner wall.&lt;/p></pre>
the <code><a href="#htmlembedelement">HTMLEmbedElement</a></code> object
representing the element should expose that interfaces.

<p>The download of the resource must <a href="#delays">delay the <code
title=event-load>load</code> event</a>.

<p>The user agent should pass the names and values of all the attributes of
the <code><a href="#embed0">embed</a></code> element that have no
namespace to the handler used. Any (namespace-less) attribute may be
Expand Down Expand Up @@ -12426,11 +12435,11 @@ brighter. A &lt;b>rat&lt;/b> scurries past the corner wall.&lt;/p></pre>

<ol>
<li>
<p>Begin a load for the resource.
</li>
<!-- XXX define
that -->
<!-- XXX xref -->
<p>Begin a load for the resource.</p>
<!-- XXX define that
--><!-- XXX xref -->
<p>The download of the resource must <a href="#delays">delay the <code
title=event-load>load</code> event</a>.</p>

<li>
<p>If the resource is not yet available (e.g. because the resource was
Expand Down Expand Up @@ -16481,16 +16490,22 @@ interface <dfn id=imagedata>ImageData</dfn> {
parser resumes</a> (amazingly enough).</p>
</dl>

<p>The download of an external script must <a href="#delays">delay the
<code title=event-load>load</code> event</a>.

<p><dfn id=executing title="executing a script block">Executing a script
block</dfn>: If the load resulted in an error (for example a DNS error, or
an HTTP 404 error), then executing the script consists of doing nothing.
If the load was successful, then the behaviour depends on the scripting
language.

<p>If <a href="#scripting2">scripting is disabled</a>, or if the
<code>Document</code> has <code title=dom-document-designMode><a
href="#designmode">designMode</a></code> enabled, then the user agent must
abort these steps without executing the script.
an HTTP 404 error), then executing the script must just consist of <a
href="#firing5" title="fire an error event">firing an <code
title=event-error>error</code> event</a> at the element.

<p>If the load was successful, then 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="#scripting3">scripting is enabled</a> and
the <code>Document</code> does not have <code
title=dom-document-designMode><a href="#designmode">designMode</a></code>
enabled, the user agent must run the script according to the semantics of
the relevant scripting language defines.

<p>If the script is from an external file, then that file must be used as
the file to execute.
Expand Down
42 changes: 32 additions & 10 deletions source
Original file line number Diff line number Diff line change
Expand Up @@ -10041,12 +10041,15 @@ brighter. A &lt;b>rat&lt;/b> scurries past the corner wall.&lt;/p></pre>
agent cannot support images, or its support for images has been
disabled.</p>

<p>The download of the image must <span>delay the <code
title="event-load">load</code> event</span>.</p>

<p>Once the download has completed, if the image is a valid image,
the user agent must <span>fire a <code
title="event-load">load</code> event</span> on the <code>img</code>
element. If the download fails or it completes but the image is not
a valid or supported image, the user agent must <span>fire an <code
title="event-load">error</code> event</span> on the <code>img</code>
title="event-error">error</code> event</span> on the <code>img</code>
element.</p>

<p>The remote server's response metadata (e.g. an HTTP 404 status
Expand Down Expand Up @@ -10175,6 +10178,9 @@ brighter. A &lt;b>rat&lt;/b> scurries past the corner wall.&lt;/p></pre>
element is created, or if the attribute is ever removed, is
<code>about:blank</code><!-- XXX xref -->.</p>

<p>The download of the resource must <span>delay the <code
title="event-load">load</code> event</span>.</p>

<p>When content loads in an <code>iframe</code>, the user agent must
<span>fire a <code title="event-load">load</code> event</span> at
the <code>iframe</code> element. When content fails to load
Expand Down Expand Up @@ -10257,6 +10263,9 @@ brighter. A &lt;b>rat&lt;/b> scurries past the corner wall.&lt;/p></pre>
scriptable interface, the <code>HTMLEmbedElement</code> object
representing the element should expose that interfaces.</p>

<p>The download of the resource must <span>delay the <code
title="event-load">load</code> event</span>.</p>

<p>The user agent should pass the names and values of all the
attributes of the <code>embed</code> element that have no namespace
to the handler used. Any (namespace-less) attribute may be specified
Expand Down Expand Up @@ -10417,8 +10426,15 @@ brighter. A &lt;b>rat&lt;/b> scurries past the corner wall.&lt;/p></pre>

<ol>

<li><p>Begin a load for the resource.</p></li><!-- XXX define
that --><!-- XXX xref -->
<li>

<p>Begin a load for the resource.</p><!-- XXX define that
--><!-- XXX xref -->

<p>The download of the resource must <span>delay the <code
title="event-load">load</code> event</span>.</p>

</li>

<li><p>If the resource is not yet available (e.g. because the
resource was not available in the cache, so that loading the
Expand Down Expand Up @@ -14565,16 +14581,22 @@ interface <dfn>ImageData</dfn> {

</dl>

<p>The download of an external script must <span>delay the <code
title="event-load">load</code> event</span>.</p>

<p><dfn title="executing a script block">Executing a script
block</dfn>: If the load resulted in an error (for example a DNS
error, or an HTTP 404 error), then executing the script consists of
doing nothing. If the load was successful, then the behaviour
depends on the scripting language.</p>
error, or an HTTP 404 error), then executing the script must just
consist of <span title="fire an error event">firing an <code
title="event-error">error</code> event</span> at the element.</p>

<p>If <span>scripting is disabled</span>, or if the
<code>Document</code> has <code
title="dom-document-designMode">designMode</code> enabled, then the
user agent must abort these steps without executing the script.</p>
<p>If the load was successful, then 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, the user
agent must run the script according to the semantics of the relevant
scripting language defines.</p>

<p>If the script is from an external file, then that file must be
used as the file to execute.</p>
Expand Down

0 comments on commit 9c74faa

Please sign in to comment.