Created
February 3, 2020 18:09
-
-
Save danhollick/1988e698c37a7700e3940eef789dd8b0 to your computer and use it in GitHub Desktop.
Post back to the sandbox
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
// ... | |
<button id="swap"></button> | |
<script> | |
window.onmessage = async event => { | |
//... | |
} | |
document.getElementById('swap').onclick = () => { | |
parent.postMessage({ pluginMessage: { type: 'swap' } }, '*') | |
} | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment