Event listeners
The SDK provides various event listeners to handle different events during the document capture process. These listeners allow you to execute custom logic when specific events occur.
addEventListener
The addEventListener
method is used to listen to events of the specified type
.
Parameters
listener
(function): The function to be executed when the event is triggered.options
(object, optional): Additional options for the event listener
removeEventListener
The removeEventListener
method is used to lto remove an event listener of the specified type
.
Parameters
callback
(function): The function to be removed.options
(object, optional): Additional options for the event listener
EventType
Type
Description
"front_capture_started"
Triggered when the capture of the front of the document has started.
"back_capture_started"
Triggered when the capture of the back of the document has started.
"capture_invalid"
Triggered when an error occurs in some validation performed by the SDK.
"capture_failed"
Triggered when an error occurs that is not handled by the SDK.
Example
Last updated