Bug 146638 - WKUIDelegate should support closing windows
Summary: WKUIDelegate should support closing windows
Status: RESOLVED DUPLICATE of bug 145957
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit2 (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified iOS 8.2
: P2 Enhancement
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2015-07-06 08:24 PDT by Stefan Arentz
Modified: 2015-07-06 16:50 PDT (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Stefan Arentz 2015-07-06 08:24:55 PDT
The WKUIDelegate has a method that is called when a new WKWebView is created when the web application calls window.open(). This is great to support things like OAuth flows that typically open up in external (popup) windows.

However, there is no way to correctly deal with web applications then calling window.close() on those windows.

This is a request for a new WKUIDelegate method that is called when the web application closes a window. Its signature could be something like this:

- (void) webView: (WKWebView * nonnull) webView wantsToCloseWebView: (WKWebView * nonnull) webViewToClose;

The application can then take appropriate action. Like updating the UI and releasing the WKWebView that is closing.
Comment 1 Radar WebKit Bug Importer 2015-07-06 16:45:48 PDT
<rdar://problem/21694688>
Comment 2 Anders Carlsson 2015-07-06 16:50:02 PDT

*** This bug has been marked as a duplicate of bug 145957 ***