> For the complete documentation index, see [llms.txt](https://tutorial.neoline.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://tutorial.neoline.io/reference/neo3-provider-api-legacy/event-methods/addeventlistener.md).

# addEventListener

Method is used to add a callback method to be triggered on a specified event.

## Example

```js
const fn = (data) => {
    console.log(`Connected Account: ${data.address}`);
}
neoline.addEventListener(neoline.EVENT.ACCOUNT_CHANGED, fn);
/* Another */
const fn = (data) => {
    console.log(`Connected Account: ${data.detail.address}`);
}
window.addEventListener('NEOLine.NEO.EVENT.ACCOUNT_CHANGED', fn) ;
```
