> For a complete index of all SignalWire documentation pages, fetch https://signalwire.com/docs/llms.txt

# once

> once method for the RoomSession class.

### once

* **once**(`event`, `fn`)

Attaches an event handler to the specified event. The handler will fire only once.

#### Parameters

| Name    | Type     | Description                                                                                               |
| :------ | :------- | :-------------------------------------------------------------------------------------------------------- |
| `event` | `string` | Name of the event. See the list of [events](/docs/browser-sdk/v3/js/reference/video/room-session/events). |
| `fn`    | Function | An event handler.                                                                                         |