Skip to content

Commit 6144c0c

Browse files
authored
Prevent execution of (some) scripts moving between documents
This causes scripts that move between documents between the preparation and execution phases to not execute, aligning with most browsers. Closes #2469. This does not address #2137, which is about scripts moving between documents between the parsing and preparation, or parsing and execution phases. Tests: web-platform-tests/wpt#19632
1 parent 249553b commit 6144c0c

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

source

+3
Original file line numberDiff line numberDiff line change
@@ -57796,6 +57796,9 @@ o............A....e
5779657796
href="https://github.com/whatwg/html/issues/2137">issue #2137</a>.</p>
5779757797
</li>
5779857798

57799+
<li><p>If <var>scriptElement</var>'s <span>preparation-time Document</span> is not equal to
57800+
<var>document</var>, then return.</p></li>
57801+
5779957802
<li><p>If <span data-x="concept-script-script">the script's script</span> is null for
5780057803
<var>scriptElement</var>, then <span data-x="concept-event-fire">fire an event</span> named <code
5780157804
data-x="event-error">error</code> at <var>scriptElement</var>, and return.</p></li>

0 commit comments

Comments
 (0)