> For the complete documentation index, see [llms.txt](https://developer.acquire.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://developer.acquire.io/widget/functioning-customization/events-callbacks/onagentstatechange-available-unavailable.md).

# onAgentStateChange (Available/Unavailable)

> The on function with event as state is to off the default behaviour when event occurs and trigger helps to manually fire the event update with the necessary parameters.

```
window.acquire = window.acquire || [];
acquire.push(function(app){
    app.on('state',function(){console.log(arguments)});
    app.trigger('state',1,2,3);
});
```
