Skip to content

Commit

Permalink
[] (0) Fire load/error events on <link> (for external resources) and …
Browse files Browse the repository at this point in the history
…<style> (credit: gh)

git-svn-id: http://svn.whatwg.org/webapps@2905 340c8d12-0b0e-0410-8428-c7bf67bfef74
  • Loading branch information
Hixie committed Mar 25, 2009
1 parent f6a4d7f commit 3a1c238
Show file tree
Hide file tree
Showing 2 changed files with 109 additions and 50 deletions.
77 changes: 52 additions & 25 deletions index
Expand Up @@ -9724,7 +9724,21 @@ http://software.hixie.ch/utilities/js/live-dom-viewer/?%3C%21DOCTYPE%20HTML%3E%0
followed and 404 responses must cause the external resource to not
be applied.)</p>

<p>Interactive user agents should provide users with a means to
<!-- the next paragraph is similar to text in the <style> section -->
<p>Once a resource <em>and any subresources it uses</em> have been
<a href=#fetch title=fetch>fetched</a>, if the loads were successful,
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> called <code title=event-load><a href=#event-load>load</a></code> at the
<code><a href=#the-link-element>link</a></code> element. If the resource or one of its
subresources fails to completely load for any reason (e.g. DNS
error, HTTP 404 response, the connection being prematurely closed,
unsupported Content-Type), the user agent must instead <a href=#queue-a-task>queue a
task</a> to <a href=#fire-a-simple-event>fire a simple event</a> called <code title=event-error><a href=#event-error>error</a></code> at the <code><a href=#the-link-element>link</a></code>
element. Non-network errors in processing the resource or its
subresources (e.g. CSS parse errors, PNG decoding errors) are not
failures for the purposes of this paragraph.</p>

<hr><p>Interactive user agents should provide users with a means to
<a href=#following-hyperlinks title="following hyperlinks">follow the hyperlinks</a>
created using the <code><a href=#the-link-element>link</a></code> element, somewhere within their
user interface. The exact interface is not defined by this
Expand Down Expand Up @@ -10668,6 +10682,19 @@ people expect to have work and what is necessary.
when the processor is invoked.<!-- so dynamic changes to the base
URL don't affect the CSS --></p>

<!-- the next paragraph is similar to text in the <link> section -->
<p>Once the element has been evaluated, if it had no subresources or
once all the subresources it uses have been <a href=#fetch title=fetch>fetched</a>, 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> called <code title=event-load><a href=#event-load>load</a></code> at the <code><a href=#the-style-element>style</a></code> element. If
the resource has a subresource that fails to completely load for any
reason (e.g. DNS error, HTTP 404 response, the connection being
prematurely closed, unsupported Content-Type), the user agent must
instead <a href=#queue-a-task>queue a task</a> to <a href=#fire-a-simple-event>fire a simple
event</a> called <code title=event-error><a href=#event-error>error</a></code> at the
<code><a href=#the-style-element>style</a></code> element. Non-network errors in the processing of
the element's contents or its subresources (e.g. CSS parse errors)
are not failures for the purposes of this paragraph.</p>

</div>

<p class=note>This specification does not specify a style system,
Expand Down Expand Up @@ -62449,30 +62476,30 @@ interface <dfn id=timeouthandler>TimeoutHandler</dfn> {
Monstad, Elliotte Harold, Eric Carlson, Eric Law, Erik Arvidsson,
Evan Martin, Evan Prodromou, fantasai, Felix Sasaki, Franck 'Shift'
Qu&eacute;lain, Garrett Smith, Geoffrey Garen, Geoffrey Sneddon,
George Lund, H&aring;kon Wium Lie, Hans S. T&oslash;mmerhalt, Henri
Sivonen, Henrik Lied, Henry Mason, Hugh Winkler, Ignacio Javier, Ivo
Emanuel Gon&ccedil;alves, J. King, Jacques Distler, James Craig,
James Graham, James Justin Harrell, James M Snell, James Perrett,
Jan-Klaas Kollhof, Jason White, Jasper Bryant-Greene, Jed Hartman,
Jeff Cutsinger, Jeff Schiller, Jeff Walden, Jens Bannmann, Jens
Fendler, Jeroen van der Meer, Jim Jewett, Jim Meehan, Joe Clark,
John Fallows, Joseph Kesselman, Jjgod Jiang, Joel Spolsky, Johan
Herland, John Boyer, John Bussjaeger, John Harding, Johnny Stenback,
Jon Gibbins, Jon Perlow, Jonathan Worent, Jorgen Horstink, Josh
Levenberg, Joshua Randall, Jukka K. Korpela, Jules
Cl&eacute;ment-Ripoche, Julian Reschke, Kai Hendry, Kartikaya Gupta,
<!-- Keryx Web, = Lars Gunther --> Kornel Lesinski,
&#40658;&#28580;&#21083;&#24535; (KUROSAWA Takeshi), Kristof
Zelechovski, Kyle Hofmann, Lachlan Hunt, Larry Page, Lars Gunther,
Laura L. Carlson, Laura Wisewell, Laurens Holst, Lee Kowalkowski,
Leif Halvard Silli, Lenny Domnitser, L&eacute;onard Bouchet, Leons
Petrazickis, Logan<!-- on moz irc -->, Loune, Maciej Stachowiak,
Magnus Kristiansen<!-- Dashiva -->, Maik Merten, Malcolm Rowe, Mark
Nottingham, Mark Rowe<!--bdash-->, Mark Schenk, Martijn Wargers,
Martin Atkins, Martin D&uuml;rst, Martin Honnen, Masataka Yakura,
Mathieu Henri, Matthew Gregan, Matthew Mastracci, Matthew Raymond,
Matthew Thomas, Mattias Waldau, Max Romantschuk, Michael 'Ratt'
Iannarelli, Michael A. Nachbaur, Michael A. Puls
George Lund, Greg Houston, H&aring;kon Wium Lie, Hans
S. T&oslash;mmerhalt, Henri Sivonen, Henrik Lied, Henry Mason, Hugh
Winkler, Ignacio Javier, Ivo Emanuel Gon&ccedil;alves, J. King,
Jacques Distler, James Craig, James Graham, James Justin Harrell,
James M Snell, James Perrett, Jan-Klaas Kollhof, Jason White, Jasper
Bryant-Greene, Jed Hartman, Jeff Cutsinger, Jeff Schiller, Jeff
Walden, Jens Bannmann, Jens Fendler, Jeroen van der Meer, Jim
Jewett, Jim Meehan, Joe Clark, John Fallows, Joseph Kesselman, Jjgod
Jiang, Joel Spolsky, Johan Herland, John Boyer, John Bussjaeger,
John Harding, Johnny Stenback, Jon Gibbins, Jon Perlow, Jonathan
Worent, Jorgen Horstink, Josh Levenberg, Joshua Randall, Jukka
K. Korpela, Jules Cl&eacute;ment-Ripoche, Julian Reschke, Kai
Hendry, Kartikaya Gupta, <!-- Keryx Web, = Lars Gunther --> Kornel
Lesinski, &#40658;&#28580;&#21083;&#24535; (KUROSAWA Takeshi),
Kristof Zelechovski, Kyle Hofmann, Lachlan Hunt, Larry Page, Lars
Gunther, Laura L. Carlson, Laura Wisewell, Laurens Holst, Lee
Kowalkowski, Leif Halvard Silli, Lenny Domnitser, L&eacute;onard
Bouchet, Leons Petrazickis, Logan<!-- on moz irc -->, Loune, Maciej
Stachowiak, Magnus Kristiansen<!-- Dashiva -->, Maik Merten, Malcolm
Rowe, Mark Nottingham, Mark Rowe<!--bdash-->, Mark Schenk, Martijn
Wargers, Martin Atkins, Martin D&uuml;rst, Martin Honnen, Masataka
Yakura, Mathieu Henri, Matthew Gregan, Matthew Mastracci, Matthew
Raymond, Matthew Thomas, Mattias Waldau, Max Romantschuk, Michael
'Ratt' Iannarelli, Michael A. Nachbaur, Michael A. Puls
II<!--Shadow2531-->, Michael Carter, Michael Gratton, Michael
Nordman, Michael Powers, Michael(tm) Smith, Michel Fortin, Michiel
van der Blonk, Mihai &#350;ucan<!-- from ROBO Design -->, Mike
Expand Down
82 changes: 57 additions & 25 deletions source
Expand Up @@ -10179,7 +10179,7 @@ http://software.hixie.ch/utilities/js/live-dom-viewer/?%3C%21DOCTYPE%20HTML%3E%0
<p>The exact behavior for links to external resources depends on the
exact relationship, as defined for the relevant link type. Some of
the attributes control whether or not the external resource is to be
applied (as defined below). <Span class="impl">For external
applied (as defined below). <span class="impl">For external
resources that are represented in the DOM (for example, style
sheets), the DOM representation must be made available even if the
resource is not applied. To obtain the resource, the user agent must
Expand All @@ -10198,6 +10198,23 @@ http://software.hixie.ch/utilities/js/live-dom-viewer/?%3C%21DOCTYPE%20HTML%3E%0
followed and 404 responses must cause the external resource to not
be applied.)</p>

<!-- the next paragraph is similar to text in the <style> section -->
<p>Once a resource <em>and any subresources it uses</em> have been
<span title="fetch">fetched</span>, if the loads were successful,
the user agent must <span>queue a task</span> to <span>fire a simple
event</span> called <code title="event-load">load</code> at the
<code>link</code> element. If the resource or one of its
subresources fails to completely load for any reason (e.g. DNS
error, HTTP 404 response, the connection being prematurely closed,
unsupported Content-Type), the user agent must instead <span>queue a
task</span> to <span>fire a simple event</span> called <code
title="event-error">error</code> at the <code>link</code>
element. Non-network errors in processing the resource or its
subresources (e.g. CSS parse errors, PNG decoding errors) are not
failures for the purposes of this paragraph.</p>

<hr>

<p>Interactive user agents should provide users with a means to
<span title="following hyperlinks">follow the hyperlinks</span>
created using the <code>link</code> element, somewhere within their
Expand Down Expand Up @@ -11295,6 +11312,21 @@ people expect to have work and what is necessary.
when the processor is invoked.<!-- so dynamic changes to the base
URL don't affect the CSS --></p>

<!-- the next paragraph is similar to text in the <link> section -->
<p>Once the element has been evaluated, if it had no subresources or
once all the subresources it uses have been <span
title="fetch">fetched</span>, the user agent must <span>queue a
task</span> to <span>fire a simple event</span> called <code
title="event-load">load</code> at the <code>style</code> element. If
the resource has a subresource that fails to completely load for any
reason (e.g. DNS error, HTTP 404 response, the connection being
prematurely closed, unsupported Content-Type), the user agent must
instead <span>queue a task</span> to <span>fire a simple
event</span> called <code title="event-error">error</code> at the
<code>style</code> element. Non-network errors in the processing of
the element's contents or its subresources (e.g. CSS parse errors)
are not failures for the purposes of this paragraph.</p>

</div>

<p class="note">This specification does not specify a style system,
Expand Down Expand Up @@ -73199,30 +73231,30 @@ interface <dfn>TimeoutHandler</dfn> {
Monstad, Elliotte Harold, Eric Carlson, Eric Law, Erik Arvidsson,
Evan Martin, Evan Prodromou, fantasai, Felix Sasaki, Franck 'Shift'
Qu&eacute;lain, Garrett Smith, Geoffrey Garen, Geoffrey Sneddon,
George Lund, H&aring;kon Wium Lie, Hans S. T&oslash;mmerhalt, Henri
Sivonen, Henrik Lied, Henry Mason, Hugh Winkler, Ignacio Javier, Ivo
Emanuel Gon&ccedil;alves, J. King, Jacques Distler, James Craig,
James Graham, James Justin Harrell, James M Snell, James Perrett,
Jan-Klaas Kollhof, Jason White, Jasper Bryant-Greene, Jed Hartman,
Jeff Cutsinger, Jeff Schiller, Jeff Walden, Jens Bannmann, Jens
Fendler, Jeroen van der Meer, Jim Jewett, Jim Meehan, Joe Clark,
John Fallows, Joseph Kesselman, Jjgod Jiang, Joel Spolsky, Johan
Herland, John Boyer, John Bussjaeger, John Harding, Johnny Stenback,
Jon Gibbins, Jon Perlow, Jonathan Worent, Jorgen Horstink, Josh
Levenberg, Joshua Randall, Jukka K. Korpela, Jules
Cl&eacute;ment-Ripoche, Julian Reschke, Kai Hendry, Kartikaya Gupta,
<!-- Keryx Web, = Lars Gunther --> Kornel Lesinski,
&#x9ed2;&#x6fa4;&#x525b;&#x5fd7; (KUROSAWA Takeshi), Kristof
Zelechovski, Kyle Hofmann, Lachlan Hunt, Larry Page, Lars Gunther,
Laura L. Carlson, Laura Wisewell, Laurens Holst, Lee Kowalkowski,
Leif Halvard Silli, Lenny Domnitser, L&eacute;onard Bouchet, Leons
Petrazickis, Logan<!-- on moz irc -->, Loune, Maciej Stachowiak,
Magnus Kristiansen<!-- Dashiva -->, Maik Merten, Malcolm Rowe, Mark
Nottingham, Mark Rowe<!--bdash-->, Mark Schenk, Martijn Wargers,
Martin Atkins, Martin D&uuml;rst, Martin Honnen, Masataka Yakura,
Mathieu Henri, Matthew Gregan, Matthew Mastracci, Matthew Raymond,
Matthew Thomas, Mattias Waldau, Max Romantschuk, Michael 'Ratt'
Iannarelli, Michael A. Nachbaur, Michael A. Puls
George Lund, Greg Houston, H&aring;kon Wium Lie, Hans
S. T&oslash;mmerhalt, Henri Sivonen, Henrik Lied, Henry Mason, Hugh
Winkler, Ignacio Javier, Ivo Emanuel Gon&ccedil;alves, J. King,
Jacques Distler, James Craig, James Graham, James Justin Harrell,
James M Snell, James Perrett, Jan-Klaas Kollhof, Jason White, Jasper
Bryant-Greene, Jed Hartman, Jeff Cutsinger, Jeff Schiller, Jeff
Walden, Jens Bannmann, Jens Fendler, Jeroen van der Meer, Jim
Jewett, Jim Meehan, Joe Clark, John Fallows, Joseph Kesselman, Jjgod
Jiang, Joel Spolsky, Johan Herland, John Boyer, John Bussjaeger,
John Harding, Johnny Stenback, Jon Gibbins, Jon Perlow, Jonathan
Worent, Jorgen Horstink, Josh Levenberg, Joshua Randall, Jukka
K. Korpela, Jules Cl&eacute;ment-Ripoche, Julian Reschke, Kai
Hendry, Kartikaya Gupta, <!-- Keryx Web, = Lars Gunther --> Kornel
Lesinski, &#x9ed2;&#x6fa4;&#x525b;&#x5fd7; (KUROSAWA Takeshi),
Kristof Zelechovski, Kyle Hofmann, Lachlan Hunt, Larry Page, Lars
Gunther, Laura L. Carlson, Laura Wisewell, Laurens Holst, Lee
Kowalkowski, Leif Halvard Silli, Lenny Domnitser, L&eacute;onard
Bouchet, Leons Petrazickis, Logan<!-- on moz irc -->, Loune, Maciej
Stachowiak, Magnus Kristiansen<!-- Dashiva -->, Maik Merten, Malcolm
Rowe, Mark Nottingham, Mark Rowe<!--bdash-->, Mark Schenk, Martijn
Wargers, Martin Atkins, Martin D&uuml;rst, Martin Honnen, Masataka
Yakura, Mathieu Henri, Matthew Gregan, Matthew Mastracci, Matthew
Raymond, Matthew Thomas, Mattias Waldau, Max Romantschuk, Michael
'Ratt' Iannarelli, Michael A. Nachbaur, Michael A. Puls
II<!--Shadow2531-->, Michael Carter, Michael Gratton, Michael
Nordman, Michael Powers, Michael(tm) Smith, Michel Fortin, Michiel
van der Blonk, Mihai &#x015E;ucan<!-- from ROBO Design -->, Mike
Expand Down

0 comments on commit 3a1c238

Please sign in to comment.