I ended up fixing this without adding a third signal in the end.
Instead, it now dispatches WebView.navigationRequested for *all* requests to open a new window, regardless of the origin of these. This is dispatched before any resources are created and should be used if the application wants to block a window from opening.
WebView.newViewRequested is now always dispatched when the underlying WebContents is ready to display. If an application implements this, it is expected that it creates a new WebView. It shouldn't be used for policy decisions (use navigationRequested for that), so I've removed NewViewRequest.url and NewViewRequest.userGesture to discourage this. I'll probably make it output a console warning if an application implements this but doesn't create a WebView.
I ended up fixing this without adding a third signal in the end.
Instead, it now dispatches WebView. navigationReque sted for *all* requests to open a new window, regardless of the origin of these. This is dispatched before any resources are created and should be used if the application wants to block a window from opening.
WebView. newViewRequeste d is now always dispatched when the underlying WebContents is ready to display. If an application implements this, it is expected that it creates a new WebView. It shouldn't be used for policy decisions (use navigationRequested for that), so I've removed NewViewRequest.url and NewViewRequest. userGesture to discourage this. I'll probably make it output a console warning if an application implements this but doesn't create a WebView.