Closed cupmm closed 1 year ago
hi @cupmm can you share how did you use the API for visitor?
I was having the same issue, but with the toggle() function. I basically copied what was shown in the docs here.
`// Composition API
` I removed the `toggle()` call from the script, and it worked as I’m calling the function from the template. @jaoaustero ... I would like to know how you would call a function from the script, though.Hi @bhaviljain68 in composition API, we call like this way. We wrapped it on onLoad, you might experience not a function because the widget is not yet loaded.
<script setup>
const toggle = inject('toggle');
const onLoad = inject('onLoad');
onLoad(() => {
toggle();
});
</script>
Hi @jaoaustero
Thanks for the quick response... :)
A suggestion that I think could help others... Please update the documentation here
Uncaught TypeError: window.Tawk_API.visitor is not a function at eval (tawk-messenger-vue-3.es.js?e3d3:228:1) at eval (Twak.vue?dd48:30:1) at eval (tawk-messenger-vue-3.es.js?e3d3:127:1) at e.value (twk-chunk-common.js:2:158302) at e.value (twk-chunk-common.js:2:157948) at e.value (twk-chunk-common.js:2:81137) at twk-chunk-common.js:2:78240