-
Notifications
You must be signed in to change notification settings - Fork 294
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
Conversation
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. |
@annevk done! PTAL |
There was a problem hiding this 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 |
There was a problem hiding this comment.
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>. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
<li><p>Let <var>eventListeners</var> be a new <a for=/>list</a>. | |
<li><p>Let <var>callbacks</var> be « ». |
@annevk feedback addressed! |
@annevk happy to land this? |
f23deea
to
1b8bfc4
Compare
Thanks @jakearchibald! |
Cheers! |
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