Skip to content

Commit cbdef30

Browse files
committed
First try
1 parent 5258aed commit cbdef30

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

src/preload/index.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,12 @@ injectRendererModule({
3232
const preloadData = ipcRenderer.sendSync("KERNEL_WINDOW_DATA");
3333

3434
// If context isolation is off, this should be patched to make sure everything complies.
35-
if (!preloadData?.contextIsolation) {
36-
contextBridge.exposeInMainWorld = (key, value) => window[key] = value;
35+
if (!!preloadData?.windowOptions?.contextIsolation) {
36+
contextBridge.exposeInMainWorld = function (key, value) {
37+
console.log("aaaa", JSON.stringify(arguments));
38+
39+
window[key] = value;
40+
};
3741
}
3842

3943
if (preloadData?.originalPreload) {

0 commit comments

Comments
 (0)