I have added custm js snippet with Admin Panel (Settings > Advanced > Custom code).
Now I need to call a function from js snippet from Velo code on my page.
When I try to do this, I am getting “function in not defined error”.
Is it possible to make interaction between Velo page code and js snipped loaded in ?
wixWindow.postMessage() // fill in the message in object.
You can use window on message to receive events.
The Velo doc have an example
I used postMessage to post data from page into HTML box (iframe).
But I have no idea how use it to call the function defined in js snippet.
My velo code and js snippet are in the same window.
The snippet is in
And velo code is in the js file generated by Wix and loaded on the same page.
Velo code is just in a different namespace, I guess
I also have same problem. Is there anyone to solve this problem?
Already followed the suggestions of → Certified-Code?
Here the link…
https://www.wix.com/velo/reference/$w/htmlcomponent/postmessage
https://www.wix.com/velo/reference/$w/htmlcomponent/onmessage