content/hifi-public/scripts/tests/qmlWebTest.js
Dale Glass 0d14e5a379 Initial data.
Needs a lot of cleanup. Data has been de-duplicated, and where identical copies existed, one of them
has been replaced with a symlink.

Some files have been excluded, such as binaries, installers and debug dumps. Some of that may still
be present.
2022-02-13 18:59:11 +01:00

19 lines
557 B
JavaScript

print("Launching web window");
var htmlUrl = Script.resolvePath("..//html/qmlWebTest.html")
webWindow = new OverlayWebWindow('Test Event Bridge', htmlUrl, 320, 240, false);
webWindow.webEventReceived.connect(function(data) {
print("JS Side event received: " + data);
});
Script.setInterval(function() {
var message = [ Math.random(), Math.random() ];
print("JS Side sending: " + message);
webWindow.emitScriptEvent(message);
}, 5 * 1000);
Script.scriptEnding.connect(function(){
webWindow.close();
webWindow.deleteLater();
});