<!--
{
  "availability" : [
    "iOS: -",
    "iPadOS: -",
    "visionOS: 27.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "WebKit",
  "identifier" : "/documentation/WebKit/WKImmersiveEnvironmentDelegate/webView(_:present:completionHandler:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "WebKit"
    ],
    "preciseIdentifier" : "c:objc(pl)WKImmersiveEnvironmentDelegate(im)webView:presentImmersiveEnvironment:completionHandler:"
  },
  "title" : "webView(_:present:completionHandler:)"
}
-->

# webView(_:present:completionHandler:)

```
func webView(_ webView: WKWebView, present environment: WKImmersiveEnvironment, completionHandler: @escaping ((any Error)?) -> Void)
```

```
func webView(_ webView: WKWebView, presentImmersiveEnvironment environment: WKImmersiveEnvironment) async throws
```

## Parameters

`webView`

The web view requesting presentation.

`environment`

The immersive environment to present.

`completionHandler`

The completion handler you must invoke once the presentation transition has completed.
The error argument should be used in case the presentation failed and the environment couldn’t be presented.

## Discussion\abstract Asks the delegate to present an immersive environment.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)