Skip to content

Instantly share code, notes, and snippets.

@luistak
Created January 27, 2021 15:47
Show Gist options
  • Save luistak/d28a22161843d0824163374cf35c0935 to your computer and use it in GitHub Desktop.
Save luistak/d28a22161843d0824163374cf35c0935 to your computer and use it in GitHub Desktop.
let said = [];
export function say(message) {
console.log({ message, said });
said.push(message)
// This postMessage communicates with everyone listening to this worker
postMessage(message);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment