aboutsummaryrefslogtreecommitdiffstats
path: root/packages/main/src/infrastructure/electron/impl/ElectronServiceView.ts
diff options
context:
space:
mode:
Diffstat (limited to 'packages/main/src/infrastructure/electron/impl/ElectronServiceView.ts')
-rw-r--r--packages/main/src/infrastructure/electron/impl/ElectronServiceView.ts10
1 files changed, 10 insertions, 0 deletions
diff --git a/packages/main/src/infrastructure/electron/impl/ElectronServiceView.ts b/packages/main/src/infrastructure/electron/impl/ElectronServiceView.ts
index edcf758..089e63a 100644
--- a/packages/main/src/infrastructure/electron/impl/ElectronServiceView.ts
+++ b/packages/main/src/infrastructure/electron/impl/ElectronServiceView.ts
@@ -136,6 +136,16 @@ export default class ElectronServiceView implements ServiceView {
136 const { reason, exitCode } = details; 136 const { reason, exitCode } = details;
137 service.setCrashed(reason, exitCode); 137 service.setCrashed(reason, exitCode);
138 }); 138 });
139
140 webContents.setWindowOpenHandler(({ url }) => {
141 // TODO Add filtering (allowlist) by URL.
142 // TODO Handle `new-window` disposition where the service wants an object returned by
143 // `window.open`.
144 // TODO Handle downloads with `save-to-disk` disposition.
145 // TODO Handle POST bodies where the window must be allowed to open or the data is lost.
146 service.addBlockedPopup(url);
147 return { action: 'deny' };
148 });
139 } 149 }
140 150
141 get webContentsId(): number { 151 get webContentsId(): number {