3.3 Events emitted from iframe to parent window

Empowering Control: managing Embed behavior with event emission

In order to control the behavior of the parent window, based on actions by the end user inside the iframe, it emits the following events in the data string:

  • locoia:flowEnabled

  • locoia:flowDisabled

  • locoia:allIntegrationsDeleted

<script type="text/javascript">
  const onMessage = ({ data }) => console.log(data)
  window.addEventListener('message', onMessage, false)
</script>

<iframe id="iframe"
        title="Inline Frame Example"
        width="800"
        height="600"
        src="https://api.locoia.com/embedded?embeddedId=...">
</iframe>

Last updated