voluptasmollitia
Version:
Monorepo for the Firebase JavaScript SDK
25 lines (14 loc) • 774 B
Markdown
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) > [@firebase/database](./database.md) > [onDisconnect](./database.ondisconnect.md)
## onDisconnect() function
Returns an `OnDisconnect` object - see [Enabling Offline Capabilities in JavaScript](https://firebase.google.com/docs/database/web/offline-capabilities) for more information on how to use it.
<b>Signature:</b>
```typescript
export declare function onDisconnect(ref: Reference): OnDisconnect;
```
## Parameters
| Parameter | Type | Description |
| --- | --- | --- |
| ref | [Reference](./database.reference.md) | The reference to add OnDisconnect triggers for. |
<b>Returns:</b>
[OnDisconnect](./database.ondisconnect.md)