Created
January 25, 2016 09:56
-
-
Save delapuente/043a3ec708db3bf86d80 to your computer and use it in GitHub Desktop.
WordPress proposal for a collaborative method for writing service workers
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Plugin 1: | |
sw_add_to_service_worker('/path/to/scope', function () { | |
// contents for the service worker... | |
}); | |
// Plugin 2: | |
sw_add_to_service_worker('/path/to/scope', function () { | |
// contents for the service worker... | |
}); | |
// Each service worker is identified by the scope to be registered | |
// but for reusing, the API could be extended to allow alias and | |
// a customizable map scope => service worker. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment