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 src="https://widget.flowxo.com/embed.js" data-fxo-widget="my-own-widget-code"></script> | |
<script> | |
// Wait until the messenger is fully | |
// ready, then send a message | |
FxoMessenger.on('stateChanged', function(state) { | |
if (state === 'connected') { | |
FxoMessenger.sendMessage('Hey!'); | |
} | |
}); |
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!'); | |
} | |
}); |
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
FxoMessenger.onMessageReceived(callback) |
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
FxoMessenger.on<EventName>(callback) |
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
FxoMessenger.removeListeners(<optional eventName>) |
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
FxoMessenger.on(eventName, callback) |
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
FxoMessenger.toggle(); |
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
FxoMessenger.destroy(); |
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
FxoMessenger.create(); |
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
// Set the messenger to open fullscreen | |
FxoMessenger.getState(); | |
// Returns Object: | |
// { | |
// state: "connected", | |
// color: "#4B0082", | |
// fullscreen: true, | |
// headerText: "Chat to Us" | |
// } |
NewerOlder