Skip to content

Instantly share code, notes, and snippets.

@gashupl
Last active June 5, 2017 15:25
Show Gist options
  • Save gashupl/3762bd8761666d9bcd8909524a5af249 to your computer and use it in GitHub Desktop.
Save gashupl/3762bd8761666d9bcd8909524a5af249 to your computer and use it in GitHub Desktop.
window.addEventListener("message", receiveMessage, false);
function receiveMessage(event) {
if (event.origin !== "http://my.source.com"){
return;
}
// Kod obsługujący odebrany komunikat.
// ...
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment