Skip to content

Instantly share code, notes, and snippets.

@goofmint
Created August 14, 2018 14:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save goofmint/cfd1882bb73e73a471fccdc404208d42 to your computer and use it in GitHub Desktop.
Save goofmint/cfd1882bb73e73a471fccdc404208d42 to your computer and use it in GitHub Desktop.
const channel = new MessageChannel();
navigator.serviceWorker.controller
.postMessage('update', [channel.port2]);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment