• 1. In order to access the HTML widget (iframe) you have to add some more code.
window.widget = document.getElementById('toto').firstChild; /// gets the iframe
widget.contentWindow.messageReceived(); // enables connection to the function
• 2. You cannot call your sendMessage() function from scene load directly or from the first keyframe in your timeline. You have to move the keyframe over 1 or 2 or 3 frames or set a timeout in the scene load and then call it.