feat: exposeInMainWorld allow to expose non-object APIs (#26594)

This commit is contained in:
Nikita Kot
2020-12-04 18:43:20 +01:00
committed by GitHub
parent b111bba387
commit 7672aa9525
4 changed files with 313 additions and 13 deletions

View File

@@ -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);
}