Contents

webView(_:shouldAllowImmersiveEnvironmentFromFrame:completionHandler:)

Declaration

func webView(_ webView: WKWebView, shouldAllowImmersiveEnvironmentFromFrame frame: WKFrameInfo, completionHandler: @escaping (Bool) -> Void)
func webView(_ webView: WKWebView, shouldAllowImmersiveEnvironmentFrom frame: WKFrameInfo) async -> Bool

Parameters

  • webView:

    The web view that received the immersive environment request.

  • frame:

    The frame information from the website requesting the immersive environment.

  • completionHandler:

    The completion handler you must invoke with the request’s answer. YES to allow the environment presentation, or NO to deny it.

Discussion

Asks the delegate whether to allow an immersive environment from the specified frame.