feat: exposeInMainWorld allow to expose non-object APIs (#26594)
This commit is contained in:
parent
b111bba387
commit
7672aa9525
4 changed files with 313 additions and 13 deletions
|
@ -8,7 +8,7 @@ const checkContextIsolationEnabled = () => {
|
|||
};
|
||||
|
||||
const contextBridge: Electron.ContextBridge = {
|
||||
exposeInMainWorld: (key: string, api: Record<string, any>) => {
|
||||
exposeInMainWorld: (key: string, api: any) => {
|
||||
checkContextIsolationEnabled();
|
||||
return binding.exposeAPIInMainWorld(key, api);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue