Comment 3 for bug 1300891

Revision history for this message
Chris Coulson (chrisccoulson) wrote :

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.