*** id: 67d77c2a-294b-41b7-b442-191415ddb41b title: once slug: /js/reference/video/room-session/once description: once method for the RoomSession class. max-toc-depth: 3 ---------------- ### 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. |