const webview = document.getElementById('wb'); webview.addEventListener('dom-ready', () => { document.getElementById('dummyloader').style.display = "none"; require('@electron/remote').getCurrentWindow().log(" * " + webview.getURL()); try { if (require('@electron/remote').getCurrentWindow().debug) { info("MainWindow", "Opening debugging tools..."); webview.openDevTools(); } } catch (e) {} }) webview.addEventListener('dom-ready', () => { setInterval(() => { try { if (webview.isCrashed()) { require('@electron/remote').getCurrentWindow().log(" * Compositing engine crashed!"); error("MainWindow", "Subcontainer crashed"); crash(new Error("Webview crashed")); } } catch (e) {} }, 2000) })