Inherit current window's node-integration in window.open by default
Fix #2100.
This commit is contained in:
parent
99e8238f90
commit
ae3b47aa75
1 changed files with 6 additions and 0 deletions
|
@ -51,6 +51,12 @@ window.open = (url, frameName='', features='') ->
|
||||||
|
|
||||||
(options[name] = parseInt(options[name], 10) if options[name]?) for name in ints
|
(options[name] = parseInt(options[name], 10) if options[name]?) for name in ints
|
||||||
|
|
||||||
|
# Inherit the node-integration option of current window.
|
||||||
|
unless options['node-integration']
|
||||||
|
for arg in process.argv when arg.indexOf('--node-integration=') is 0
|
||||||
|
options['node-integration'] = arg.substr(-4) is 'true'
|
||||||
|
break
|
||||||
|
|
||||||
guestId = ipc.sendSync 'ATOM_SHELL_GUEST_WINDOW_MANAGER_WINDOW_OPEN', url, frameName, options
|
guestId = ipc.sendSync 'ATOM_SHELL_GUEST_WINDOW_MANAGER_WINDOW_OPEN', url, frameName, options
|
||||||
if guestId
|
if guestId
|
||||||
new BrowserWindowProxy(guestId)
|
new BrowserWindowProxy(guestId)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue