##The WebWindow is dead, long live the WebWindow!
I managed to Frankenstein-together a
WebWindow clone using
Example URL (to load into Interface for testing): example.js
(after a second or two delay a non-embedded “WebWindow” should open showing the latest forums posts).
window.EventBridge now boots automagically on the HTML side – so including
WebWindowEx and setting
WebWindow=WebWindowEx on the client side should be sufficient in most cases for
WebWindow scripts to “just work” again.
Here is an example Client Script URL that boots an old test script in a wrapper that way: rewebwindow.js#test-webviews.js
(the first part of that URL is a bootstrap script – the second part is the actual test script, test-webviews.js, which creates a sample of the four types of HTML5 views available in HiFi including a
Full Github Gist: WebWindowEx
Example Client Script:
var WWEX_BASE = 'https://rawgit.com/humbletim/e2d53fce636c5c24a4c45fec57e8159f/raw/d3a8097ccd8c0e562e1710c5835fb9e6236537b2/';
Script.include(WWEX_BASE + 'WebWindowEx.js');
// bring WebWindow back to life by aliasing to WebWindowEx
var WebWindow = WebWindowEx;
// in theory everything on the scripting side should then work like before
var oldschool = new WebWindow('Title', 'about:blank', 800, 600);
The WebWindowEx.js source has a few more details about which
WebWindow getters, setters and signals are currently emulated. If anyone else uses and discovers any missing or misaligned methods lemme know.