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

Add set up the request/validate the response hooks to script fetching #746

Merged
merged 1 commit into from
Feb 29, 2016

Conversation

domenic
Copy link
Member

@domenic domenic commented Feb 26, 2016

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

@domenic domenic added the addition/proposal New features or enhancements label Feb 26, 2016
@domenic domenic changed the title Module service workers Add set up the request/validate the response hooks to script fetching Feb 26, 2016
@domenic domenic force-pushed the module-service-workers branch from 6ae424e to ea2b6d4 Compare February 26, 2016 19:24
@domenic domenic added the do not merge yet Pull request must not be merged per rationale in comment label Feb 26, 2016
@domenic
Copy link
Member Author

domenic commented Feb 26, 2016

@jungkees @annevk please take a look at ea2b6d4 which should address your comments. (Which you can still see at 6ae424e even though GitHub has lost track of them.)

@annevk annevk force-pushed the module-service-workers branch from ea2b6d4 to b42dc2d Compare February 27, 2016 07:22

<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>
Copy link
Member

Choose a reason for hiding this comment

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

returns*

Copy link
Member Author

Choose a reason for hiding this comment

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

Steps are plural though...

Copy link
Member

Choose a reason for hiding this comment

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

My bad.

@domenic domenic removed the do not merge yet Pull request must not be merged per rationale in comment label Feb 28, 2016
@annevk annevk self-assigned this Feb 28, 2016
@annevk
Copy link
Member

annevk commented Feb 28, 2016

I would like a LGTM from @jungkees as a comment here and then I'll merge.

jungkees added a commit to w3c/ServiceWorker that referenced this pull request Feb 29, 2016
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
@jungkees
Copy link
Contributor

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)
@annevk annevk force-pushed the module-service-workers branch from b42dc2d to 33ef23a Compare February 29, 2016 12:19
@annevk annevk merged commit 33ef23a into master Feb 29, 2016
@annevk annevk deleted the module-service-workers branch February 29, 2016 12:19
jungkees added a commit to w3c/ServiceWorker that referenced this pull request Mar 2, 2016
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
addition/proposal New features or enhancements
Development

Successfully merging this pull request may close these issues.

3 participants