@codingame/monaco-vscode-lifecycle-service-override 1.83.16 → 1.85.0-next.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@codingame/monaco-vscode-lifecycle-service-override",
3
- "version": "1.83.16",
3
+ "version": "1.85.0-next.0",
4
4
  "keywords": [],
5
5
  "author": {
6
6
  "name": "CodinGame",
@@ -18,7 +18,7 @@
18
18
  "module": "index.js",
19
19
  "types": "index.d.ts",
20
20
  "dependencies": {
21
- "vscode": "npm:@codingame/monaco-vscode-api@1.83.16",
22
- "monaco-editor": "0.44.0"
21
+ "vscode": "npm:@codingame/monaco-vscode-api@1.85.0-next.0",
22
+ "monaco-editor": "0.45.0"
23
23
  }
24
24
  }
@@ -5,6 +5,7 @@ import { localizeWithPath } from 'monaco-editor/esm/vs/nls.js';
5
5
  import { addDisposableListener, EventType } from 'monaco-editor/esm/vs/base/browser/dom.js';
6
6
  import { WillSaveStateReason, IStorageService } from 'monaco-editor/esm/vs/platform/storage/common/storage.js';
7
7
  import { CancellationToken } from 'monaco-editor/esm/vs/base/common/cancellation.js';
8
+ import { mainWindow } from 'monaco-editor/esm/vs/base/browser/window.js';
8
9
 
9
10
  let BrowserLifecycleService = class BrowserLifecycleService extends AbstractLifecycleService {
10
11
  constructor(logService, storageService) {
@@ -16,8 +17,8 @@ let BrowserLifecycleService = class BrowserLifecycleService extends AbstractLife
16
17
  this.registerListeners();
17
18
  }
18
19
  registerListeners() {
19
- this.beforeUnloadListener = addDisposableListener(window, EventType.BEFORE_UNLOAD, (e) => this.onBeforeUnload(e));
20
- this.unloadListener = addDisposableListener(window, EventType.PAGE_HIDE, () => this.onUnload());
20
+ this.beforeUnloadListener = addDisposableListener(mainWindow, EventType.BEFORE_UNLOAD, (e) => this.onBeforeUnload(e));
21
+ this.unloadListener = addDisposableListener(mainWindow, EventType.PAGE_HIDE, () => this.onUnload());
21
22
  }
22
23
  onBeforeUnload(event) {
23
24
  if (this.ignoreBeforeUnload) {
@@ -95,7 +96,7 @@ let BrowserLifecycleService = class BrowserLifecycleService extends AbstractLife
95
96
  return;
96
97
  }
97
98
  this.didUnload = true;
98
- this._register(addDisposableListener(window, EventType.PAGE_SHOW, (e) => this.onLoadAfterUnload(e)));
99
+ this._register(addDisposableListener(mainWindow, EventType.PAGE_SHOW, (e) => this.onLoadAfterUnload(e)));
99
100
  const logService = this.logService;
100
101
  this._onWillShutdown.fire({
101
102
  reason: 2 ,
@@ -113,7 +114,7 @@ let BrowserLifecycleService = class BrowserLifecycleService extends AbstractLife
113
114
  if (!wasRestoredFromCache) {
114
115
  return;
115
116
  }
116
- this.withExpectedShutdown({ disableShutdownHandling: true }, () => window.location.reload());
117
+ this.withExpectedShutdown({ disableShutdownHandling: true }, () => mainWindow.location.reload());
117
118
  }
118
119
  };
119
120
  BrowserLifecycleService = ( __decorate([