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

ServiceWorkerRegistration.update() should return Promise<ServiceWorkerRegistration> #1684

Open
jespertheend opened this issue Feb 3, 2024 · 2 comments

Comments

@jespertheend
Copy link

Currently it is defined in lib.dom.ts to return Promise<void>.

See the MDN page for update() which mentions:

Return value
A Promise that resolves with a ServiceWorkerRegistration object.

The spec is a bit unclear because it mentions some job logic:

  1. Let job be the result of running Create Job with update

but in the end it seems like this promise is always resolved with a ServiceWorkerRegistration.

@skyclouds2001
Copy link

skyclouds2001 commented Dec 14, 2024

but the spec idl says this method return void, though in browser implement is seems to return with a ServiceWorkerRegistration

@jespertheend
Copy link
Author

Hmm interesting, seems like an issue was submitted about this 5 years ago but it has never been addressed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants