Client Events
Note
Each of the below client events listeners are instantiated using manager.createEventListener
and enabled by using client.attachEvent
.
E.g.
// earlier in the Managed Component:
manager.createEventListener('mousedown', async event => {
console.info('🐁 ⬇️ Mousedown:', event.payload)
})
// later in the same component
manager.addEventListener('clientcreated', ({ client }) => {
client.attachEvent('mousedown')
})
The above example establishes a mousedown
event listener for each newly created client.
📄️ Mouse down
example payload output:
📄️ Mouse move
example payload output:
📄️ Mouse up
example payload output:
📄️ Page hide
example payload output:
📄️ Page show
example payload output:
📄️ Performance entries
example payload output:
📄️ Resize
example payload output:
📄️ Scroll
example payload output:
📄️ Single Page Application navigation
The historyChange event is called whenever the page changes in a Single Page Application, by mean of history.pushState or history.replaceState. Tools can automatically trigger an action when this event occurs using an Event Listener.
📄️ Visibility Change
example payload output: