@@ -1038,13 +1038,13 @@ must return a new {{EventTarget}}.
1038
1038
if this would be useful for your programs. For now, all author-created {{EventTarget}} s do not
1039
1039
participate in a tree structure.</p>
1040
1040
1041
- <p> The
1042
- <dfn method for=EventTarget><code>addEventListener(< var>type </var>, <var>callback </var>, <var>options </var>)</code></dfn>
1043
- method, when invoked, must run these steps:
1041
+ <p> To <dfn export>add an event listener</dfn> given an <code> EventTarget </code> object
1042
+ <var> eventTarget </var> , string <var> type </var> , callback <var> callback </var> , and
1043
+ <a for=/>dictionary</a> or boolean <var> options </var> , run these steps:
1044
1044
1045
1045
<ol>
1046
1046
<li>
1047
- <p> If <a>context object</a > 's <a>relevant global object</a> is a {{ServiceWorkerGlobalScope}}
1047
+ <p> If <var> eventTarget </var > 's <a>relevant global object</a> is a {{ServiceWorkerGlobalScope}}
1048
1048
object and its associated <a>service worker</a> 's <a for="service worker">script resource</a>' s
1049
1049
<a for="service worker">has ever been evaluated flag</a> is set, then <a>throw</a> a
1050
1050
<code> TypeError</code> .
@@ -1059,13 +1059,21 @@ method, when invoked, must run these steps:
1059
1059
<li><p> Let <var> capture</var> , <var> passive</var> , and <var> once</var> be the result of
1060
1060
<a lt="flatten more">flattening more</a> <var> options</var> .
1061
1061
1062
- <li><p> If <a>context object</a > 's associated list of <a>event listener</a> does not contain an
1062
+ <li><p> If <var> eventTarget </var > 's associated list of <a>event listener</a> does not contain an
1063
1063
<a>event listener</a> whose <b> type</b> is <var> type</var> , <b> callback</b> is <var> callback</var> ,
1064
1064
and <b> capture</b> is <var> capture</var> , then append a new <a>event listener</a> to it, whose
1065
1065
<b> type</b> is <var> type</var> , <b> callback</b> is <var> callback</var> , <b> capture</b> is
1066
1066
<var> capture</var> , <b> passive</b> is <var> passive</var> , and <b> once</b> is <var> once</var> .
1067
1067
</ol>
1068
1068
1069
+ <p class=note> The <a>add an event listener</a> concept exists to ensure
1070
+ <a>event handler attributes</a> use the same code path. [[HTML]]
1071
+
1072
+ <p> The
1073
+ <dfn method for=EventTarget><code>addEventListener(<var>type</var>, <var>callback</var>, <var>options</var>)</code></dfn>
1074
+ method, when invoked, must <a>add an event listener</a> with the <a>context object</a> ,
1075
+ <var> type</var> , <var> callback</var> , and <var> options</var> .
1076
+
1069
1077
<p> The
1070
1078
<dfn method for=EventTarget><code>removeEventListener(<var>type</var>, <var>callback</var>, <var>options</var>)</code></dfn>
1071
1079
method, when invoked, must, run these steps
0 commit comments