Last active
January 25, 2016 09:51
-
-
Save delapuente/f60ef0e877dbef4a7473 to your computer and use it in GitHub Desktop.
WordPress API extensions to support ServiceWorkers
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
// Enqueue API extension for the registration script | |
// This uses wp_enqueue_script() to register it with a well known name such as sw-registration:/path/to/scope | |
sw_enqueue_registration_script('/path/to/scope'); | |
// Plugin 1 | |
wp_enqueue_script('plugin-1-sw-setup', '/plugin1/js/manager.js', array('sw-registration:/path/to/scope')); | |
// Plugin 2 | |
wp_enqueue_script('plugin-2-sw-setup', '/plugin2/js/manager.js', array('sw-registration:/path/to/scope')); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment