This pull request allows 'new-window' event handlers (running in the master process) to give back the BrowserWindow instance they created when the default behavior is prevented.
The suggested way to return this window is to set the new property newGuest with the newly created BrowserWindow. This may not be the best way to achieve this so others suggestions are welcome.
What scenario does this turn helpful ?
@deepak1556 In our application, we have a class that encapsulates BrowserWindow. For each new window, we must create one instance of our object and then return the encapsulated BrowserWindow.
@MichaelVasseur I'm testing your change but the tests are failing, can you fix them?
Also notice that I just did a rebase of this branch from master branch, so you need to do a reset locally.
@zcbenz Ah ok, I did the rebase locally but didn't pushed yet because of the failing tests.
'new-window' event handlers can return their window when default beha…
…vior is prevented
Updated the related documentation
Rebase with recent changes
Sets correct openerId in mergeBrowserWindowOptions() to give correct …
…options to 'new-window' event handler
Fix JS Lint issues
Can you show an example how to use this?
I want to get new window's WebContents
I think created window should be available in e.target, that would be awesome