Skip to main content

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

KeyTypeDescription
storyUrlstringThe Url of the story for which the focus state has changed
openBooleanThe new state the embed. true if a story has been focused, false if the story has been thrown back into the page layout