Commit 44157e22 authored by Tasso Evangelista's avatar Tasso Evangelista

Add workaround for webview readiness

parent 5a8b8dd8
......@@ -208,7 +208,9 @@ class SideBar extends EventEmitter {
if (item) {
item.classList.add('active');
}
webview.getActive().send && webview.getActive().send('request-sidebar-color');
if (webview.getActive() && webview.getActive().classList.contains('ready')) {
webview.getActive().send('request-sidebar-color');
}
}
deactiveAll() {
......
......@@ -100,6 +100,7 @@ class WebView extends EventEmitter {
});
webviewObj.addEventListener('dom-ready', () => {
webviewObj.classList.add('ready');
this.emit('dom-ready', host.url);
});
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment