Route window.open to "new-window" event
This commit is contained in:
parent
94818aef26
commit
389e56ce36
5 changed files with 41 additions and 24 deletions
|
@ -2,6 +2,10 @@ EventEmitter = require('events').EventEmitter
|
|||
binding = process.atomBinding 'web_contents'
|
||||
ipc = require 'ipc'
|
||||
|
||||
# Routed window.open messages.
|
||||
ipc.on 'ATOM_SHELL_WEB_CONTENTS_WINDOW_OPEN', (event, url, name, features) ->
|
||||
event.sender.emit 'new-window', url, name, features
|
||||
|
||||
module.exports.wrap = (webContents) ->
|
||||
return null unless webContents.isAlive()
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue