Enable contextIsolation on webviews
This commit is contained in:
parent
b7f5ca9da6
commit
bd906ddda6
@ -466,6 +466,10 @@ function loadService(serviceId: number, service: any) {
|
|||||||
service.view.setAttribute('autosize', 'true');
|
service.view.setAttribute('autosize', 'true');
|
||||||
service.view.setAttribute('src', emptyPage);
|
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
|
// Append element to DOM
|
||||||
document.querySelector('#services')?.appendChild(service.view);
|
document.querySelector('#services')?.appendChild(service.view);
|
||||||
|
|
||||||
|
@ -110,7 +110,7 @@ export default class MainWindow extends Window {
|
|||||||
this.serviceSettingsWindow.setup();
|
this.serviceSettingsWindow.setup();
|
||||||
this.serviceSettingsWindow.onClose(() => {
|
this.serviceSettingsWindow.onClose(() => {
|
||||||
this.serviceSettingsWindow = undefined;
|
this.serviceSettingsWindow = undefined;
|
||||||
})
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user