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

Export terms needed for ServiceWorker/1674 #1170

Merged
merged 5 commits into from
Mar 22, 2023

Conversation

jakearchibald
Copy link
Collaborator

@jakearchibald jakearchibald commented Mar 20, 2023

This exports the terms needed for w3c/ServiceWorker#1672 (now w3c/ServiceWorker#1674).

However, this includes exporting a term that was marked "Intentionally not exported". Soooooo, what now @annevk? 😄

We need to be able to look at the listeners to determine they're all no-op. I could add an algorithm to the DOM spec that gets the listeners of type "fetch" for a given service worker global. That would avoid exporting the whole concept. In fact, we wouldn't seen the other exports either in that case.


Preview | Diff

@jakearchibald jakearchibald changed the title Export terms needed for ServiceWorker/1671 Export terms needed for ServiceWorker/1674 Mar 20, 2023
@annevk
Copy link
Member

annevk commented Mar 20, 2023

That sounds preferable. Preferably with a "legacy" prefix to prevent copycats. "legacy-obtain service-worker fetch event listeners" or some such that takes a service worker global and returns that subset of listeners.

@jakearchibald
Copy link
Collaborator Author

@annevk done! PTAL

Copy link
Member

@annevk annevk left a comment

Choose a reason for hiding this comment

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

Thanks, looks good modulo nits.

dom.bs Outdated
@@ -1243,6 +1243,25 @@ property of the event being dispatched.
<p>Ideally, any new event APIs are defined such that they do not need this property. (Use
<a href="https://github.com/whatwg/dom/issues">whatwg/dom</a> for discussion.)

<p>To <dfn export>legacy-obtain service worker fetch event listeners</dfn> given a
Copy link
Member

Choose a reason for hiding this comment

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

event listener callbacks*

dom.bs Outdated
{{EventListener}} objects.

<ol>
<li><p>Let <var>eventListeners</var> be a new <a for=/>list</a>.
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
<li><p>Let <var>eventListeners</var> be a new <a for=/>list</a>.
<li><p>Let <var>callbacks</var> be « ».

@jakearchibald
Copy link
Collaborator Author

@annevk feedback addressed!

@jakearchibald
Copy link
Collaborator Author

@annevk happy to land this?

dom.bs Show resolved Hide resolved
@annevk annevk force-pushed the jakearchibald/export-event-terms branch from f23deea to 1b8bfc4 Compare March 22, 2023 12:21
@annevk annevk merged commit 79f58b7 into main Mar 22, 2023
@annevk annevk deleted the jakearchibald/export-event-terms branch March 22, 2023 12:24
@annevk
Copy link
Member

annevk commented Mar 22, 2023

Thanks @jakearchibald!

@jakearchibald
Copy link
Collaborator Author

Cheers!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants