Created
July 5, 2017 12:04
-
-
Save johnmjackson/9c78533dbc8b9ece93d3c110ac92d790 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 messengerReady() { | |
// Wait until the messenger is fully | |
// ready, then send a message | |
FxoMessenger.on('stateChanged', function(state) { | |
if (state === 'connected') { | |
FxoMessenger.sendMessage('Hey!'); | |
} | |
}); | |
// Subscribe to all messages received, | |
// logging them to the console | |
FxoMessenger.on('messageReceived', function(message) { | |
console.log(message); | |
}); | |
} | |
</script> | |
<script src="https://widget.flowxo.com/embed.js?callback=messengerReady" async defer data-fxo-widget="my-own-widget-code"></script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I think if you change this to an HTML file you'll get nicer highlighting?