Skip to content

Instantly share code, notes, and snippets.

@dtapuska
Created August 23, 2018 16:07
Show Gist options
  • Save dtapuska/bd92755849991c2fd9b87e1d46691321 to your computer and use it in GitHub Desktop.
Save dtapuska/bd92755849991c2fd9b87e1d46691321 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