Created
August 7, 2019 16:59
-
-
Save slavingia/d9ba730d2f87ea357a333f311010dc79 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
listener = function(ev) { | |
if (ev.data && JSON.parse(ev.data).post_message_name == "sale") { | |
document.getElementById('post-message-data').innerHTML = ev.data; | |
} | |
} | |
window.addEventListener('message', listener, false); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment