-
Notifications
You must be signed in to change notification settings - Fork 315
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
Should register() trigger byte-for-byte checking when WorkerType is updated? #1408
Comments
I think I'd expect a new service worker to be installed and the byte-to-byte check skipped as if the URL changed. See also #1359. |
Thanks! // ==== script in something.html ====
// Register a.js, and it imports b.js too.
await navigator.serviceWorker.register('a.js');
// Register b.js, but b.js is identical to the one we previously put into the script cache map.
await navigator.serviceWorker.register('b.js');
// ==== a.js ====
a = true;
if (typeof b === 'undefined') {
importScripts('b.js');
}
// ==== b.js ====
b = true;
if (typeof a === 'undefined') {
importScripts('a.js');
} For example, does changing [[Register]] like this and refers to the flag in the [[Update]] algorithm make sense?
|
This makes the following changes: * updateViaCache is a live property. This is covered by the WPT registration-updateviacache.https.html. However we are missing tests for a register() that rejects with a new updateViaCache property. The desired behavior is to only update the property if register() resolves. * Changing worker type bypasses the byte-for-byte update check. This is covered by WPT update-registration-with-type.https.html. * Adds Worker type and updateViaCache to the job equivalence check. This probably can have a WPT for successive register() calls that vary these properties don’t get coalesced into a single job. Addresses w3c#1189, w3c#1408, w3c#1359, and w3c#1358.
…1411) This makes the following changes: * updateViaCache is a live property. This is mostly covered by the WPT registration-updateviacache.https.html. A test that the updateViaCache change is only committed if the register() call resolves is added in web-platform-tests/wpt#17131. * Changing worker type bypasses the byte-for-byte update check. This is covered by WPT update-registration-with-type.https.html. * Adds Worker type and updateViaCache to the job equivalence check. A test for this is added in web-platform-tests/wpt#17131. Addresses #1189, #1408, #1359, and #1358.
Addressed in #1411 |
Should (2) install a new ServiceWorker and invoke install/activate event?
The text was updated successfully, but these errors were encountered: