The Dixa chat widget has a javascript API that allows you to control language, close/open view, change widget text and sign in a user.

You can test the API by opening the javascript console in Chrome dev tools, for example. The API uses the global script.