Embedding
<script src="https://custom-uibakery.com/uibakery-embedded.js"></script>
<iframe width="100%" height="50%" id="uibakery" src="https://custom-uibakery.com/share/SKDUFYUDF"></iframe><input type="number" value="10" />
<button>Execute Action</button>
<script>
const bakery = UIBakery('#uibakery');
bakery.onReady(() => {
document.querySelector('button').addEventListener('click', () => {
const limit = parseInt(document.querySelector('input').value, 10);
// execute UI Bakery action with {{params}} = { limit: 10 }
bakery.triggerAction('actionName', { limit });
});
// listen to messages sent from UI Bakery
bakery.onMessage('eventName', params => {
console.log(params);
});
});
</script>Listen to messages from UI Bakery in the host app
Send a message from the host app to UI Bakery
Last updated
Was this helpful?