refactor: port window.open and window.opener to use ctx bridge instead of hole punching (#23235)
* refactor: port window.open and window.opener to use ctx bridge instead of hole punching * refactor: only run the isolated init bundle when webview is enabled
This commit is contained in:
parent
c68589f212
commit
abe5cf398c
11 changed files with 178 additions and 85 deletions
|
@ -21,8 +21,11 @@ export default contextBridge;
|
|||
|
||||
export const internalContextBridge = {
|
||||
contextIsolationEnabled,
|
||||
overrideGlobalMethodFromIsolatedWorld: (keys: string[], method: Function) => {
|
||||
return binding._overrideGlobalMethodFromIsolatedWorld(keys, method);
|
||||
overrideGlobalValueFromIsolatedWorld: (keys: string[], value: any) => {
|
||||
return binding._overrideGlobalValueFromIsolatedWorld(keys, value, false);
|
||||
},
|
||||
overrideGlobalValueWithDynamicPropsFromIsolatedWorld: (keys: string[], value: any) => {
|
||||
return binding._overrideGlobalValueFromIsolatedWorld(keys, value, true);
|
||||
},
|
||||
overrideGlobalPropertyFromIsolatedWorld: (keys: string[], getter: Function, setter?: Function) => {
|
||||
return binding._overrideGlobalPropertyFromIsolatedWorld(keys, getter, setter || null);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue