To invoke an action, use the following construction:
window.ReplainAPI('<action>', <parameters>);
Open chat
window.ReplainAPI('open');
Close chat
window.ReplainAPI('close');
Check that the chat is online
Boolean
const isChatOnline = window.ReplainAPI('isChatOnline');
console.log('online:', isChatOnline)