remove setTimeout call when signalling readyness cos it was neccessary for absolute layouting

This commit is contained in:
Johannes Rieken 2016-04-15 11:49:36 +02:00
parent b564444547
commit 8234916967
2 changed files with 5 additions and 7 deletions

View file

@ -75,8 +75,10 @@ class ManagedWebview {
this._ready = new TPromise<this>(resolve => {
const subscription = addDisposableListener(this._webview, 'ipc-message', (event) => {
if (event.channel === 'webview-ready') {
// console.info('[PID Webview] ' + event.args[0]);
addClass(this._webview, 'ready');
addClass(this._webview, 'ready'); // can be found by debug command
subscription.dispose();
resolve(this);
}

View file

@ -84,12 +84,8 @@
ipcRenderer.sendToHost(command, data);
};
// signal ready, needs a short timeout for an
// unknown reason
setTimeout(function() {
ipcRenderer.sendToHost('webview-ready', process.pid);
}, 10);
// signal ready
ipcRenderer.sendToHost('webview-ready', process.pid);
</script>
</body>
</html>