You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[webview] window.open throw errors even when new-window events are handled #1864
@deepak1556 It should emit the new-window event, but there were some implementation problems since you can not send synchronous messages from webview to host.
@zcbenz Would it be possible to tag webviews to have the capability to open new windows with window.open in the same way that the BrowserWindow can? Maybe a new tag on webview like "allow-popups" or something? If it's not specified then you'd fall back onto the new-window event (or possible do both if that attribute is provided).
This would be useful for us, since we have quite a few places in our code that do window.open () with various settings and right now we're getting the same message @felicienfrancois was getting:
It is not allowed to open new window from this WebContents
Activity
frankhale commentedon Jun 4, 2015
I was getting this as well but this is fixed in master by #1850 if my
memory serves me correctly.
On Thu, Jun 4, 2015, 07:41 Félicien FRANCOIS [email protected]
wrote:
deepak1556 commentedon Jun 18, 2015
@zcbenz what is the expected behaviour here ? should we emit the event, even if there is no window creation
zcbenz commentedon Jun 19, 2015
@deepak1556 It should emit the
new-windowevent, but there were some implementation problems since you can not send synchronous messages from webview to host.felicienfrancois commentedon Jun 23, 2015
@frankhale this is not fixed yet. Still happening in 0.28.3
frankhale commentedon Jun 23, 2015
Looks like I was wrong. I just went back to check my own app. This issue has not been closed so it's all good.
kjlaw89 commentedon Jun 24, 2015
@zcbenz Would it be possible to tag webviews to have the capability to open new windows with window.open in the same way that the BrowserWindow can? Maybe a new tag on webview like "allow-popups" or something? If it's not specified then you'd fall back onto the new-window event (or possible do both if that attribute is provided).
This would be useful for us, since we have quite a few places in our code that do window.open () with various settings and right now we're getting the same message @felicienfrancois was getting:
felicienfrancois commentedon Jun 24, 2015
@kjlaw89 this tag could also be automatically toggled when adding an event listener to window-open.