feat: add webContents.setWindowOpenHandler API (#24517)
Co-authored-by: Jeremy Rose <jeremya@chromium.org>
This commit is contained in:
parent
6b222a2d8a
commit
0b85fdf26c
56 changed files with 2087 additions and 885 deletions
|
@ -1,7 +1,7 @@
|
|||
const { hasSwitch } = process._linkedBinding('electron_common_command_line');
|
||||
const { getWebPreference } = process._linkedBinding('electron_renderer_web_frame');
|
||||
const binding = process._linkedBinding('electron_renderer_context_bridge');
|
||||
|
||||
const contextIsolationEnabled = hasSwitch('context-isolation');
|
||||
const contextIsolationEnabled = getWebPreference(window, 'contextIsolation');
|
||||
|
||||
const checkContextIsolationEnabled = () => {
|
||||
if (!contextIsolationEnabled) throw new Error('contextBridge API can only be used when contextIsolation is enabled');
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue