Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent bbd8b27 commit 94b8b9aCopy full SHA for 94b8b9a
packages/vscode/src/fill/windowsService.ts
@@ -10,6 +10,15 @@ import { client } from "../client";
10
import { showOpenDialog } from "../dialog";
11
import { workbench } from "../workbench";
12
13
+// VS Code overrides window.open to call openExternal, but we then call
14
+// window.open which results in an infinite loop. Store the function but also
15
+// make it unable to be set (doesn't work otherwise).
16
+const windowOpen = window.open;
17
+Object.defineProperty(window, "open", {
18
+ set: (): void => { /* Not allowed. */ },
19
+ get: (): Function => windowOpen,
20
+});
21
+
22
/**
23
* Instead of going to the shared process, we'll directly run these methods on
24
* the client. This setup means we can only control the current window.
0 commit comments