Skip to content

Commit 63a0e64

Browse files
authored
Fire a load event for network errors in <embed>
Fixes #4024. Fixes #1461. Tests: web-platform-tests/wpt#24518
1 parent dd4ac57 commit 63a0e64

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

source

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30752,6 +30752,10 @@ interface <dfn>HTMLEmbedElement</dfn> : <span>HTMLElement</span> {
3075230752
<span>the <code>embed</code> element setup steps</span> for <var>element</var>, then
3075330753
return.</p></li>
3075430754

30755+
<li><p>If <var>response</var> is a <span>network error</span>, then <span
30756+
data-x="concept-event-fire">fire an event</span> named <code
30757+
data-x="event-load">load</code> at <var>element</var>, and return.</p></li>
30758+
3075530759
<li><p>Let <var>type</var> be the result of determining the <span
3075630760
data-x="concept-embed-type">type of content</span> given <var>element</var> and
3075730761
<var>response</var>.</p></li>
@@ -30857,10 +30861,9 @@ interface <dfn>HTMLEmbedElement</dfn> : <span>HTMLElement</span> {
3085730861
</ol>
3085830862
<!-- This algorithm is a monument to bad design. Go legacy! -->
3085930863

30860-
<p class="note">It is intentional that the above algorithm allows <var>response</var> to be a
30861-
<span>network error</span> or to have a non-<span>ok status</span>. This allows servers to return
30862-
data for plugins even with error responses (e.g., HTTP 500 Internal Server Error codes can still
30863-
contain plugin data).</p>
30864+
<p class="note">It is intentional that the above algorithm allows <var>response</var> to have a
30865+
non-<span>ok status</span>. This allows servers to return data for plugins even with error
30866+
responses (e.g., HTTP 500 Internal Server Error codes can still contain plugin data).</p>
3086430867

3086530868
<p>To <dfn>display a plugin</dfn> for an <code>embed</code> element <var>element</var>, given a
3086630869
string <var>type</var> and optionally a <span data-x="concept-response">response</span>

0 commit comments

Comments
 (0)