Created
July 31, 2017 12:17
-
-
Save 8lane/bfba25c91fd9a63f0c9d072bb28cf3cc to your computer and use it in GitHub Desktop.
This file contains 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
<script> | |
(function() { | |
var dispatchMessage = function(evt, message, result) { | |
if (evt) { | |
evt.preventDefault(); | |
} | |
const data = { | |
'func': message, | |
'result': result | |
}; | |
return window.parent.window.postMessage(data, '*'); | |
} | |
/* Update balance on load & set new deposit step */ | |
dispatchMessage(evt, 'depositOnConfirmation'); | |
/* Event listener for close button */ | |
document.getElementById('close').addEventListener('click', function(evt) { | |
dispatchMessage(evt, 'depositStepClose', ''); | |
}); | |
})(); | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment