@loopback/docs
Version:
Documentation files rendered at [https://loopback.io](https://loopback.io)
36 lines (23 loc) • 1.09 kB
Markdown
---
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) > [@loopback/context](./context.md) > [Binding](./context.binding.md) > [once](./context.binding.once.md)
## Binding.once() method
The "changed" event is emitted by methods such as `tag`<!-- -->, `inScope`<!-- -->, `to`<!-- -->, and `toClass`<!-- -->.
<b>Signature:</b>
```typescript
once(eventName: 'changed', listener: BindingEventListener): this;
```
## Parameters
| Parameter | Type | Description |
| --- | --- | --- |
| eventName | 'changed' | The name of the event - always <code>changed</code>. |
| listener | [BindingEventListener](./context.bindingeventlistener.md) | The listener function to call when the event is emitted. |
<b>Returns:</b>
this