More Configurations
Events
An event is exposed to the window when the story gets focused on (mobile only).
You just need to subscribe to the window event story-embed-state-change :
<script>
window.addEventListener('story-embed-state-change', (event) => doSomething(event.detail));
</script>
Event Details
| Key | Type | Description |
|---|---|---|
| storyUrl | string | The Url of the story for which the focus state has changed |
| open | Boolean | The new state the embed. true if a story has been focused, false if the story has been thrown back into the page layout |