---
lang: en
title: 'API docs: context.binding.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.binding.once.html
---

<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [@loopback/context](./context.md) &gt; [Binding](./context.binding.md) &gt; [once](./context.binding.once.md)

## Binding.once() method

The "changed" event is emitted by methods such as `tag`<!-- -->, `inScope`<!-- -->, `to`<!-- -->, and `toClass`<!-- -->.

**Signature:**

```typescript
once(eventName: 'changed', listener: BindingEventListener): this;
```

## Parameters

<table><thead><tr><th>

Parameter


</th><th>

Type


</th><th>

Description


</th></tr></thead>
<tbody><tr><td markdown="1">

eventName


</td><td markdown="1">

'changed'


</td><td markdown="1">

The name of the event - always `changed`<!-- -->.


</td></tr>
<tr><td markdown="1">

listener


</td><td markdown="1">

[BindingEventListener](./context.bindingeventlistener.md)


</td><td markdown="1">

The listener function to call when the event is emitted.


</td></tr>
</tbody></table>

**Returns:**

this


