mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-29 13:03:42 +01:00
ipc - have an explicit method to mark a window ready
This commit is contained in:
@@ -91,15 +91,18 @@ export class CodeWindow extends Disposable implements ICodeWindow {
|
||||
|
||||
private static readonly MAX_URL_LENGTH = 2 * 1024 * 1024; // https://cs.chromium.org/chromium/src/url/url_constants.cc?l=32
|
||||
|
||||
private readonly _onLoad = this._register(new Emitter<void>());
|
||||
readonly onLoad = this._onLoad.event;
|
||||
|
||||
private readonly _onReady = this._register(new Emitter<void>());
|
||||
readonly onReady = this._onReady.event;
|
||||
|
||||
private readonly _onClose = this._register(new Emitter<void>());
|
||||
readonly onClose = this._onClose.event;
|
||||
|
||||
private readonly _onDestroy = this._register(new Emitter<void>());
|
||||
readonly onDestroy = this._onDestroy.event;
|
||||
|
||||
private readonly _onLoad = this._register(new Emitter<void>());
|
||||
readonly onLoad = this._onLoad.event;
|
||||
|
||||
private hiddenTitleBarStyle: boolean | undefined;
|
||||
private showTimeoutHandle: NodeJS.Timeout | undefined;
|
||||
private _lastFocusTime: number;
|
||||
@@ -346,6 +349,9 @@ export class CodeWindow extends Disposable implements ICodeWindow {
|
||||
while (this.whenReadyCallbacks.length) {
|
||||
this.whenReadyCallbacks.pop()!(this);
|
||||
}
|
||||
|
||||
// Events
|
||||
this._onReady.fire();
|
||||
}
|
||||
|
||||
ready(): Promise<ICodeWindow> {
|
||||
|
||||
Reference in New Issue
Block a user