Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make addEventListener throw for service worker optimization #155

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions dom.bs
Original file line number Diff line number Diff line change
Expand Up @@ -1065,6 +1065,15 @@ seen from the definition above, an <a>event listener</a> is a more broad concept
method, when invoked, must run these steps:

<ol>
<li>
<p>If the <a>context object</a>'s global object is a {{ServiceWorkerGlobalScope}} object and its
associated <a>service worker</a>'s <a>script resource</a>'s <a>has ever been evaluated flag</a> is
set, <a>throw</a> a <code>TypeError</code>. [[!SW]]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm a little bit afraid bikeshed won't pick up on these references if I try to build it. Do you happen to have bikeshed installed and could you try? If not, I'll figure it out.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Your help would be appreciated!


<p class="note no-backref">To optimize storing the event types allowed for the service worker and
to avoid non-deterministic changes to the event listeners, invocation of the method is allowed
only during the very first evaluation of the service worker script.

<li><p>If <var>callback</var> is null, terminate these steps.

<li><p>Let <var>capture</var> and <var>passive</var> be the result of <a>flattening</a>
Expand All @@ -1082,6 +1091,10 @@ method, when invoked, must run these steps:
method, when invoked, must, run these steps

<ol>
<li><p>If the <a>context object</a>'s global object is a {{ServiceWorkerGlobalScope}} object and
its associated <a>service worker</a>'s <a>script resource</a>'s <a>has ever been evaluated flag</a>
is set, <a>throw</a> a <code>TypeError</code>. [[!SW]]

<li><p>Let <var>capture</var> and <var>passive</var> be the result of <a>flattening</a>
<var>options</var>.

Expand Down