Last active
December 2, 2017 14:49
-
-
Save asticode/f6b530d6c930367c9301ba39a080d423 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
// This will wait for the astilectron namespace to be ready | |
document.addEventListener('astilectron-ready', function() { | |
// This will listen to messages sent by GO | |
astilectron.onMessage(function(message) { | |
// Process message | |
if (message.name === "event.name") { | |
return {payload: message.message + " world"}; | |
} | |
}); | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment