Skip to content

Latest commit

 

History

History
27 lines (20 loc) · 699 Bytes

spa-setup.md

File metadata and controls

27 lines (20 loc) · 699 Bytes

Single Page Application

Here are the basic of how to use callbacks and expose functions from the plugin.


Instance property

To access the API functions, call the $tawkMessenger anywhere in your components. Upon using the tawk-messenger-vue-2 it will auto register the global scope.

this.$tawkMessenger.toggle();

Event handling

You can listen on events emitted by the plugin, It must be exactly match the name used to listen to that event, you can see the list of events here.

this.$tawkMessenger.$on('load', () => {
    // place your code here
});



You can see the list of APIs in API reference.