New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
"new-win-policy" event does not fire for popup windows #1519
Comments
Thanks for reporting. I'll fix this. The event is intent to capture new window from 3rd party content. So gui.Window.open() case was left behind. btw, you could try 'window.open()' before it's fixed. |
The fix requires deeper modifications where the ID of window is handled. I tend to push it to 0.9.1 to keep 0.9.0 more stable than rc1. |
That's fine. I just wanted to report. /// Overwrite links with target=_blank to open in real browser
Array.prototype.forEach.call(outputFrame.contentDocument.querySelectorAll('a[target=_blank]'),
function(link)
{
link.addEventListener('click', function(evt)
{
gui.Shell.openExternal(link.href);
evt.preventDefault();
},
false
);
}
); is still in place as a workaround. |
Fix #1519 in a better way. See 0b0dfe625 in Chrome repo
The event does not fire for windows opened by gui.Window.open()
It just works for the main window and its child iframes.
Tested with Windows 7 32bit node-webkit v. 0.9.0rc1.
For a demo paste the code into the dev console of node-webkit:
The text was updated successfully, but these errors were encountered: