Skip to content

Commit

Permalink
Inherit current window's node-integration in window.open by default
Browse files Browse the repository at this point in the history
Fix #2100.
  • Loading branch information
zcbenz committed Jul 6, 2015
1 parent 99e8238 commit ae3b47a
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions atom/renderer/lib/override.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,12 @@ window.open = (url, frameName='', features='') ->

(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
if guestId
new BrowserWindowProxy(guestId)
Expand Down

0 comments on commit ae3b47a

Please sign in to comment.