Skip to content

Commit bd9d98b

Browse files
committed
💄
1 parent 81b873b commit bd9d98b

File tree

1 file changed

+6
-4
lines changed
  • src/vs/code/electron-main

1 file changed

+6
-4
lines changed

src/vs/code/electron-main/app.ts

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -167,11 +167,13 @@ export class CodeApplication extends Disposable {
167167
event.preventDefault();
168168
});
169169
app.on('remote-get-current-web-contents', event => {
170-
// The driver needs access to web contents
171-
if (!this.environmentService.args.driver) {
172-
this.logService.trace(`App#on(remote-get-current-web-contents): prevented`);
173-
event.preventDefault();
170+
if (this.environmentService.args.driver) {
171+
return; // the driver needs access to web contents
174172
}
173+
174+
this.logService.trace(`App#on(remote-get-current-web-contents): prevented`);
175+
176+
event.preventDefault();
175177
});
176178
app.on('web-contents-created', (_event: Electron.Event, contents) => {
177179
contents.on('will-attach-webview', (event: Electron.Event, webPreferences, params) => {

0 commit comments

Comments
 (0)