@@ -89889,8 +89889,7 @@ dictionary <dfn>PromiseRejectionEventInit</dfn> : <span>EventInit</span> {
89889
89889
89890
89890
<p>To <dfn>deactivate an event handler</dfn> given an <code>EventTarget</code> object
89891
89891
<var>eventTarget</var> and a string <var>name</var> that is the <span data-x="event handler
89892
- name">name</span> of an <span data-x="event handlers">event handler</span>, take the following
89893
- steps:</p>
89892
+ name">name</span> of an <span data-x="event handlers">event handler</span>, run these steps:</p>
89894
89893
89895
89894
<ol>
89896
89895
<li><p>Let <var>handlerMap</var> be <var>eventTarget</var>'s <span>event handler
@@ -89911,10 +89910,24 @@ dictionary <dfn>PromiseRejectionEventInit</dfn> : <span>EventInit</span> {
89911
89910
null.</p></li>
89912
89911
</ol>
89913
89912
89913
+ <p>To <dfn>erase all event listeners and handlers</dfn> given an <code>EventTarget</code> object
89914
+ <var>eventTarget</var>, run these steps:</p>
89915
+
89916
+ <ol>
89917
+ <li><p>If <var>eventTarget</var> has an associated <span>event handler map</span>, then for each
89918
+ <var>name</var> → <var>eventHandler</var> of <var>eventTarget</var>'s associated <span>event
89919
+ handler map</span>, <span>deactivate an event handler</span> given <var>eventTarget</var> and
89920
+ <var>name</var>.</p></li>
89921
+
89922
+ <li><p><span>Remove all event listeners</span> given <var>eventTarget</var>.</p></li>
89923
+ </ol>
89924
+
89925
+ <p class="note">This algorithm is used to define <code
89926
+ data-x="dom-document-open">document.open(<var>type</var>, <var>replace</var>)</code>.</p>
89927
+
89914
89928
<p>To <dfn>activate an event handler</dfn> given an <code>EventTarget</code> object
89915
89929
<var>eventTarget</var> and a string <var>name</var> that is the <span data-x="event handler
89916
- name">name</span> of an <span data-x="event handlers">event handler</span>, take the following
89917
- steps:</p>
89930
+ name">name</span> of an <span data-x="event handlers">event handler</span>, run these steps:</p>
89918
89931
89919
89932
<ol>
89920
89933
<li><p>Let <var>handlerMap</var> be <var>eventTarget</var>'s <span>event handler
@@ -90929,6 +90942,9 @@ document.body.appendChild(frame)</code></pre>
90929
90942
<li><p>If <var>document</var> is not an <span>active document</span>, then return
90930
90943
<var>document</var>.</p></li>
90931
90944
90945
+ <li><p>Let <var>window</var> be <var>document</var>'s <span
90946
+ data-x="concept-relevant-global">relevant global object</span>.</p></li>
90947
+
90932
90948
<li><p>If <var>document</var>'s <span>origin</span> is not <span>same origin</span> to the
90933
90949
<span>origin</span> of the <span>responsible document</span> specified by the <span>entry
90934
90950
settings object</span>, then throw a <span>"<code>SecurityError</code>"</span>
@@ -90983,7 +90999,10 @@ document.body.appendChild(frame)</code></pre>
90983
90999
<li><p><span data-x="abort a document">Abort</span> <var>document</var>.</p></li>
90984
91000
90985
91001
<li><p>For each <span>shadow-including inclusive descendant</span> <var>node</var> of
90986
- <var>document</var>, <span>remove all event listeners</span> with <var>node</var>.</p></li>
91002
+ <var>document</var>, <span>erase all event listeners and handlers</span> given
91003
+ <var>node</var>.</p></li>
91004
+
91005
+ <li><p><span>Erase all event listeners and handlers</span> given <var>window</var>.</p></li>
90987
91006
90988
91007
<li><p>Remove any <span data-x="concept-task">tasks</span> associated with <var>document</var> in
90989
91008
any <span>task source</span>.</p></li>
@@ -90998,8 +91017,8 @@ document.body.appendChild(frame)</code></pre>
90998
91017
realm</span> with the following customizations:</p>
90999
91018
91000
91019
<ul>
91001
- <li><p>For the global object, create a new <code>Window</code> object
91002
- <var>window</var>.</p></li>
91020
+ <li><p>For the global object, create a new <code>Window</code> object and set
91021
+ <var>window</var> to it .</p></li>
91003
91022
91004
91023
<li><p>For the global <b>this</b> binding, use <var>document</var>'s <span>browsing
91005
91024
context</span>'s associated <code>WindowProxy</code>.</p></li>
0 commit comments