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

Allow unregistering Service Worker scripts #94

Open
miina opened this issue Oct 24, 2018 · 1 comment
Open

Allow unregistering Service Worker scripts #94

miina opened this issue Oct 24, 2018 · 1 comment

Comments

@miina
Copy link
Contributor

miina commented Oct 24, 2018

Currently only method for registering service worker scripts exists, however, it should also be possible to unregister scripts.

As on example this could be used if a plugin wants to create their own script for a feature (such as offline commenting) as opposed to using the default -- having more than one matching routes would show a warning in console and only use the first match omitting the others.

@westonruter
Copy link
Collaborator

Yes.

The other option would be to override the src for an existing registered script, but unregistering should also be possible. For the replacement, the same script handle should probably be used in case of other plugins registering service worker scripts which have it as a dependency.

This is related to #33 in that perhaps there should be a capability to have a service worker script registered but not enqueued. In this way there could be service worker functionality that is defined and available in core, but which isn't necessarily used.

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

No branches or pull requests

2 participants