Merge pull request #7407 from thomsonreuters/New_Window_Handler_Can_Create_And_Return_Window

New-window event handler can return its own BrowserWindow instance
This commit is contained in:
Cheng Zhao 2016-10-06 14:37:48 +09:00 committed by GitHub
commit 5285b729be
2 changed files with 52 additions and 40 deletions

View file

@ -155,7 +155,9 @@ requested by `window.open` or an external link like `<a target='_blank'>`.
By default a new `BrowserWindow` will be created for the `url`.
Calling `event.preventDefault()` will prevent creating new windows.
Calling `event.preventDefault()` will prevent creating new windows. In such case, the
`event.newGuest` may be set with a reference to a `BrowserWindow` instance to make it
used by the Electron's runtime.
#### Event: 'will-navigate'