Skip to content

Instantly share code, notes, and snippets.

@asticode
Last active December 2, 2017 14:22
Show Gist options
  • Save asticode/d2208ea6f6ef6e9e4d7d08da97845b2c to your computer and use it in GitHub Desktop.
Save asticode/d2208ea6f6ef6e9e4d7d08da97845b2c to your computer and use it in GitHub Desktop.
// This will wait for the astilectron namespace to be ready
document.addEventListener('astilectron-ready', function() {
// This will send a message to GO
astilectron.sendMessage({name: "event.name", payload: "hello"}, function(message) {
console.log("received " + message.payload)
});
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment