chore: clean up context bridge scopes and add specs for internal bridge (#23334)
* chore: clean up context bridge context scopes * spec: add specs for internalContextBridge
This commit is contained in:
parent
cf635c5fac
commit
7f9b7b2e95
4 changed files with 269 additions and 121 deletions
11
typings/internal-electron.d.ts
vendored
11
typings/internal-electron.d.ts
vendored
|
@ -19,6 +19,17 @@ declare namespace Electron {
|
|||
setAppPath(path: string | null): void;
|
||||
}
|
||||
|
||||
interface ContextBridge {
|
||||
debugGC(): { functionCount: number }
|
||||
internalContextBridge: {
|
||||
contextIsolationEnabled: boolean;
|
||||
overrideGlobalValueFromIsolatedWorld(keys: string[], value: any): void;
|
||||
overrideGlobalValueWithDynamicPropsFromIsolatedWorld(keys: string[], value: any): void;
|
||||
overrideGlobalPropertyFromIsolatedWorld(keys: string[], getter: Function, setter?: Function): void;
|
||||
isInMainWorld(): boolean;
|
||||
}
|
||||
}
|
||||
|
||||
interface WebContents {
|
||||
_getURL(): string;
|
||||
getOwnerBrowserWindow(): Electron.BrowserWindow;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue