Event

ReplaySDK provides a series of event callback functions.

The event handling system of ReplaySDK is a key module to ensure that callback function notifications can be received in all embedded iframes.

Example: You have a callback function called onStepError. When this function is triggered in a sub-iframe, it will not be limited to notifying only that specific iframe. Instead, it will first notify the top iframe, and then pass this notification down to all other iframes from the top iframe. This ensures that each iframe that has embedded ReplaySDK can receive the notification of this callback function.

This design logic ensures that no matter which iframe an event is triggered in, all iframes can receive the notification, providing great convenience for developers.

API

Event
Description

onError

ReplaySDK global error callback

onStepStart

Callback before the step starts executing

onStepChange

Callback when the step changes

onStepComplete

Callback when the step has finished executing

onStepError

Callback when an error occurs during step execution

onCreateWindow

Callback when ReplaySDK creates a new window

onCreateTab

Callback when ReplaySDK creates a new tab page

onSwitchWindow

Callback when ReplaySDK switches windows

onSwitchTab

Callback when ReplaySDK switches tab pages

Last updated