We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
register
Hi All, Apologies if this is a silly question. It seems like when I call .register() the promise resolves with a service worker that is active.
.register()
Is this guaranteed? Will there by at least any service worker (installing, waiting or active?) on the registration, or can there be none?
I tried tracing through the spec, and it seems (assuming I executed all the job instructions correctly) that this is probably true; but neither https://developer.mozilla.org/en-US/docs/Web/API/Service_Worker_API/Using_Service_Workers or https://developers.google.com/web/fundamentals/instant-and-offline/service-worker/lifecycle say anything about it, so I'm left unsure as to whether this is something I can trust.
Assuming it is true, it might be nice to add something to https://www.w3.org/TR/service-workers-1/#navigator-service-worker-register that makes it clear what I can assume as a caller of the .register() method when the returned promise resolves.
The text was updated successfully, but these errors were encountered:
At least one of reg.installing, reg.waiting or reg.active will be a SW object.
reg.installing
reg.waiting
reg.active
I've got a doc sprint coming up, hopefully we can improve MDN as part of that.
Sorry, something went wrong.
No branches or pull requests
Hi All, Apologies if this is a silly question. It seems like when I call
.register()
the promise resolves with a service worker that is active.Is this guaranteed? Will there by at least any service worker (installing, waiting or active?) on the registration, or can there be none?
I tried tracing through the spec, and it seems (assuming I executed all the job instructions correctly) that this is probably true; but neither https://developer.mozilla.org/en-US/docs/Web/API/Service_Worker_API/Using_Service_Workers or https://developers.google.com/web/fundamentals/instant-and-offline/service-worker/lifecycle say anything about it, so I'm left unsure as to whether this is something I can trust.
Assuming it is true, it might be nice to add something to https://www.w3.org/TR/service-workers-1/#navigator-service-worker-register that makes it clear what I can assume as a caller of the .register() method when the returned promise resolves.
The text was updated successfully, but these errors were encountered: