Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save omunroe-com/6b1a2a7e1c940697688b722e4c27046e to your computer and use it in GitHub Desktop.
Save omunroe-com/6b1a2a7e1c940697688b722e4c27046e to your computer and use it in GitHub Desktop.
PostMessage equivalence
worker.postMessage('example', {transfer: [a,b]});
will be equivalent to
worker.postMessage('example', [a, b]);
window.postMessage('example', 'http://example.com');
will be equivalent to
window.postMessage('example', {targetOrigin: 'http://example.com'});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment