Skip to content

Commit 7bcf0f8

Browse files
authored
Fire <link rel=preload> error events only for network errors
A part of #1142. Although no browsers match this exactly, and implementers aren't sure this will be implementable, this is at least closer to reality than the previous spec, and reflects the direction everyone wants to go.
1 parent 93be098 commit 7bcf0f8

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

source

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26261,8 +26261,17 @@ document.body.appendChild(wbr);</code></pre>
2626126261
<li><p>Otherwise, call <var>preloadEntry</var>'s <span data-x="preload on response
2626226262
available">on response available</span> with <var>response</var>.</p></li>
2626326263

26264-
<li><p><span data-x="concept-event-fire">Fire an event</span> named <code
26265-
data-x="event-load">load</code> at <var>el</var>.</p></li>
26264+
<li>
26265+
<p>If <var>response</var> is a <span>network error</span>, <span
26266+
data-x="concept-event-fire">fire an event</span> named <code
26267+
data-x="event-error">error</code> at <var>el</var>. Otherwise, <span
26268+
data-x="concept-event-fire">fire an event</span> named <code data-x="event-load">load</code>
26269+
at <var>el</var>.</p>
26270+
26271+
<p class="XXX">The actual browsers' behavior is different from the spec here, and the
26272+
feasibility of changing the behavior has not yet been investigated. See <a
26273+
href="https://github.com/whatwg/html/issues/1142">issue #1142</a>.</p>
26274+
</li>
2626626275

2626726276
<li><p><span>Unblock rendering</span> on <var>el</var>.</p></li>
2626826277
</ol>

0 commit comments

Comments
 (0)