Events
Events emitted by the SelphID Widget component
The SelphID Widget emits events during its lifecycle.
Event format
facephi-selphid-widget wraps the internal engine facephi-selphid. When the engine emits an event, the wrapper forwards it by passing the internal CustomEvent as the detail of the external event. Therefore, the widget's useful payload is in event.detail.detail, not in event.detail.
// Structure of the event received in <facephi-selphid-widget>
widgetEvent = {
detail: { // CustomEvent forwarded by the wrapper
detail: { ... } // Actual payload (ExtractionFinishDetail, etc.)
}
};
const payload = widgetEvent.detail.detail;Usage example
<facephi-selphid-widget
onExtractionFinish={(event) => {
const payload = event.detail.detail;
console.log('SELPHID RESULT:', payload);
}}
/>Events emitted by SelphID Widget
Extraction results
extractionFinish: Document extraction completed successfully.
User interaction
timeoutErrorButtonClick: The user clicked the button on timeout or error.
userCancel: The user canceled the process.
Timers
extractionTimeout: The capture time limit was reached.
moduleLoaded: The widget has finished loading.
Error handling
errorTimeout: The time limit on the terminal error view expired.
exceptionCaptured: An exception occurred during execution.
maxAttemptsExceeded: The allowed capture attempts have been exhausted.
Extraction process
trackStatus: Internal status change during capture.
Last updated