Message 1 of 4
Tutorials using the command sendToWebEngine are missing a vital detail

Not applicable
12-12-2019
06:36 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
There are a lot of great samples how to use HTML5 with VRED.
Unfortunately none of them shows how to access the data parameter of the following python code in JavaScript
sendToWebEngine( name, event, data )
VRED uses a so called CustomEvent to talk to the WebEngine. I was successfully accessing the data parameter from python as the .detail member of the JavaScript event like this:
document.addEventListener("SET_TEXT1", function(evt) { document.getElementById("hudText1").innerText = evt.detail; });