webView(_:shouldAllowImmersiveEnvironmentFromFrame:completionHandler:)
Declaration
func webView(_ webView: WKWebView, shouldAllowImmersiveEnvironmentFromFrame frame: WKFrameInfo, completionHandler: @escaping (Bool) -> Void)func webView(_ webView: WKWebView, shouldAllowImmersiveEnvironmentFrom frame: WKFrameInfo) async -> BoolParameters
- 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.
YESto allow the environment presentation, orNOto deny it.
Discussion
Asks the delegate whether to allow an immersive environment from the specified frame.