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
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
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);
}