Preflight Checklist
Problem Description
This supersedes #28377. setWindowOpenHandler is missing all the fancy arguments that new-window had. And did-create-window is too late because you need the arguments to decide what to do.
Some examples:
- I only want
disposition === 'new-window' and deny all others
- In case of
disposition === '*-tab' I want to deny and instead create a BrowserView for my custom tab implementation
- I want to handle
postBody without creating a new window
You get the gist.
Proposed Solution
If setWindowOpenHandler is supposed to replace new-window it needs to offer the same flexibility
Alternatives Considered
Use did-create-window and undo the window if needed. But that defeats the original purpose
new-window is fired after the contents is already created by Chrome. This is a problem when the application wants to prevent that window from being opened, as killing the window during initialization causes many problems and leads to the inevitable crash.
Additional Information
n/a
Preflight Checklist
Problem Description
This supersedes #28377.
setWindowOpenHandleris missing all the fancy arguments thatnew-windowhad. Anddid-create-windowis too late because you need the arguments to decide what to do.Some examples:
disposition === 'new-window'anddenyall othersdisposition === '*-tab'I want todenyand instead create aBrowserViewfor my custom tab implementationpostBodywithout creating a new windowYou get the gist.
Proposed Solution
If
setWindowOpenHandleris supposed to replacenew-windowit needs to offer the same flexibilityAlternatives Considered
Use
did-create-windowand undo the window if needed. But that defeats the original purposeAdditional Information
n/a