mirror of
https://github.com/Microsoft/vscode
synced 2024-10-30 03:25:38 +00:00
remove setTimeout call when signalling readyness cos it was neccessary for absolute layouting
This commit is contained in:
parent
b564444547
commit
8234916967
2 changed files with 5 additions and 7 deletions
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -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>
|
Loading…
Reference in a new issue