diff --git a/frontend/ts/index.ts b/frontend/ts/index.ts index 5b499a6..f0eb02b 100644 --- a/frontend/ts/index.ts +++ b/frontend/ts/index.ts @@ -466,6 +466,10 @@ function loadService(serviceId: number, service: any) { service.view.setAttribute('autosize', 'true'); service.view.setAttribute('src', emptyPage); + // Enable context isolation. This is currently not used as there is no preload script; however it could prevent + // eventual future human mistakes. + service.view.setAttribute('webpreferences', 'contextIsolation=yes'); + // Append element to DOM document.querySelector('#services')?.appendChild(service.view); diff --git a/src/windows/MainWindow.ts b/src/windows/MainWindow.ts index dc3e6c4..59a708d 100644 --- a/src/windows/MainWindow.ts +++ b/src/windows/MainWindow.ts @@ -110,7 +110,7 @@ export default class MainWindow extends Window { this.serviceSettingsWindow.setup(); this.serviceSettingsWindow.onClose(() => { this.serviceSettingsWindow = undefined; - }) + }); } });