Redirect BrowserWindow's "will-navigate" event to WebContents
This commit is contained in:
parent
60df32aab5
commit
c2975d2bcc
2 changed files with 5 additions and 1 deletions
|
@ -30,6 +30,10 @@ BrowserWindow::_init = ->
|
|||
options = show: true, width: 800, height: 600
|
||||
ipc.emit 'ATOM_SHELL_GUEST_WINDOW_MANAGER_WINDOW_OPEN', event, url, frameName, options
|
||||
|
||||
# Redirect "will-navigate" to webContents.
|
||||
@on '-will-navigate', (event, url) =>
|
||||
@webContents.emit 'will-navigate', event, url
|
||||
|
||||
# Remove the window from weak map immediately when it's destroyed, since we
|
||||
# could be iterating windows before GC happened.
|
||||
@once 'closed', =>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue