onAgentStateChange (Available/Unavailable)
The state event triggers when the agent changes it's state to either 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.
1
window.acquire = window.acquire || [];
2
acquire.push(function(app){
3
app.on('state',function(){console.log(arguments)});
4
app.trigger('state',1,2,3);
5
});
Copied!
Last modified 6mo ago
Copy link