<html>
    <head>
      <base href="https://bugs.webkit.org/" />
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - WKUIDelegate should support closing windows"
   href="https://bugs.webkit.org/show_bug.cgi?id=146638">146638</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>WKUIDelegate should support closing windows
          </td>
        </tr>

        <tr>
          <th>Classification</th>
          <td>Unclassified
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>WebKit
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>528+ (Nightly build)
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>Unspecified
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>iOS 8.2
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>Enhancement
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>P2
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>WebKit2
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>webkit-unassigned&#64;lists.webkit.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>stefan&#64;arentz.ca
          </td>
        </tr></table>
      <p>
        <div>
        <pre>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.</pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are the assignee for the bug.</li>
      </ul>
    </body>
</html>