-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
Add set up the request/validate the response hooks to script fetching #746
Conversation
6ae424e
to
ea2b6d4
Compare
ea2b6d4
to
b42dc2d
Compare
|
||
<li><p>The caller specified custom steps to <span | ||
data-x="fetching-scripts-validate-response">validate the response</span>, which when performed | ||
on <var>response</var> return false.</p></li> |
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.
returns*
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.
Steps are plural though...
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.
My bad.
I would like a LGTM from @jungkees as a comment here and then I'll merge. |
Define service worker's type to support both classic mode and module mode. Integrate fetch a classic worker script/fetch a module script tree in html with set up the request/validate the response hooks customized for service worker. Update Run Service Worker to run the script depending on the script's type. Changes in HTML: whatwg/html#746
LGTM. I also made a change in SW, accordingly: w3c/ServiceWorker@9111303 Please review it if I'm using it in the right way. |
This allows more complicated callers, like service workers, to customize script fetching as necessary. See [1], and in particular [2]. [1]: w3c/ServiceWorker#831 [2]: w3c/ServiceWorker#831 (comment)
b42dc2d
to
33ef23a
Compare
Define service worker's type to support both classic mode and module mode. Integrate fetch a classic worker script/fetch a module script tree in html with set up the request/validate the response hooks customized for service worker. Update Run Service Worker to run the script depending on the script's type. Changes in HTML: whatwg/html#746
Add set up the request/validate the response hooks to script fetching
This allows more complicated callers, like service workers, to
customize script fetching as necessary. See 1, and in particular 2.
This is tagged "do not merge yet" since we should merge #745 first. I think they should be two separate commits to clarify the bugfixes vs. the new features.
Reviewers: @jungkees, @annevk, @mkruisselbrink.
The vision is that with these in hand the SW spec can do "fetch a classic worker script" or "fetch a module script tree", setting destination to "serviceworker" and with appropriate "set up the request" and "validate the response" steps.
Direct link to relevant changes in this PR (instead of the pieces from #745): 6ae424e