Skip to content

uiDelegates

Your UI delegates, in order, by the rules of navigationDelegates.

var uiDelegates: [WKUIDelegate] { get set }

Discussion

Their decisions are createWebViewWith, the alert, confirm and prompt panels and the media capture permission. webViewDidClose reaches every delegate.

A callback goes only to the list of the protocol that declares it: a navigation delegate’s alert panel, or a UI delegate’s action policy, is never called.

A delegate that holds a panel’s completion handler should set webView.accessibilityElementsHidden until it answers, as the core does for its own panels: an accessibility query (XCTest’s) into the blocked page hangs.