Initial clean project import
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
import {contextBridge} from "electron";
|
||||
|
||||
export function exposeContext(key, value) {
|
||||
if (process.contextIsolated) {
|
||||
try {
|
||||
contextBridge.exposeInMainWorld(key, value);
|
||||
} catch (error) {
|
||||
console.error(error);
|
||||
}
|
||||
} else {
|
||||
window[key] = value;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user