---
lang: en
title: 'API docs: context.contextview.once'
keywords: LoopBack 4.0, LoopBack 4, Node.js, TypeScript, OpenAPI
sidebar: lb4_sidebar
editurl: https://github.com/loopbackio/loopback-next/tree/master/packages/context
permalink: /doc/en/lb4/apidocs.context.contextview.once.html
---

<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [@loopback/context](./context.md) &gt; [ContextView](./context.contextview.md) &gt; [once](./context.contextview.once.md)

## ContextView.once() method

The "bind" event is emitted when a new binding is added to the view.

**Signature:**

```typescript
once(eventName: 'bind', listener: <V>(event: ContextViewEvent<V>) => void): this;
```

## Parameters

<table><thead><tr><th>

Parameter


</th><th>

Type


</th><th>

Description


</th></tr></thead>
<tbody><tr><td>

eventName


</td><td>

'bind'


</td><td>

The name of the event - always `bind`<!-- -->.


</td></tr>
<tr><td>

listener


</td><td>

&lt;V&gt;(event: [ContextViewEvent](./context.contextviewevent.md)<!-- -->&lt;V&gt;) =&gt; void


</td><td>

The listener function to call when the event is emitted.


</td></tr>
</tbody></table>

**Returns:**

this


