> For the complete documentation index, see [llms.txt](https://docs.facephi.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.facephi.com/docs.facephi-en/sdks/sdk-web/componentes/selphi-biometria-facial/eventos/moduleloaded.md).

# moduleLoaded

## Details

It is emitted when the internal engine has finished its Initialization and the widget is ready.

**Event:** `moduleLoaded`

**Type:** `FacephiSelphiWidgetCustomEvent<WidgetLoadedEvent>` | `CustomEvent<WidgetLoadedEvent>`

### Syntax

```typescript
selphi.addEventListener('moduleLoaded', onModuleLoaded);
```

### Received object

The payload is of type `SelphiWidgetLoadedDetail` and is in `event.detail.detail`:

* `eventType` (`string`): Type of emitted event.
* `camerasDeviceInfo` (`MediaTrackSettings[]` | `string`): Information about the device's cameras.
* `deviceType` (`string`): Type of device running.
* `resolutionHeight` (`number`): Initial height resolution.
* `resolutionWidth` (`number`): Initial width resolution.
* `widgetConfiguration` (`object`): Effective configuration applied to the engine (e.g. `Stabilization`, `Antispoof`, `CameraWidth`).
* `widgetVersion` (`string`): Version of the engine component.

## Description

Allows hiding external loading screens or running logic when the widget is ready to interact.

### Considerations

The payload is in `event.detail.detail` (see [event format](/docs.facephi-en/sdks/sdk-web/componentes/selphi-biometria-facial/eventos.md#formato-de-los-eventos)). `widgetConfiguration` reflects the final values after applying defaults and the wrapper props.

***

## Example

```jsx
<facephi-selphi-widget
    onModuleLoaded={(event) => {
      const { widgetVersion, resolutionWidth, resolutionHeight } = event.detail.detail;
      console.log('Selphi loaded:', widgetVersion, resolutionWidth, resolutionHeight);
    }}
/>
```

```typescript
import { type SelphiWidgetLoadedDetail } from '@facephi/sdk-web-wc';

selphi.addEventListener('moduleLoaded', (event) => {
  const detail: SelphiWidgetLoadedDetail = event.detail.detail;
});
```
