---
title: "webView(_:present:completionHandler:)"
framework: webkit
role: symbol
role_heading: Instance Method
path: "webkit/wkimmersiveenvironmentdelegate/webview(_:present:completionhandler:)"
---

# webView(_:present:completionHandler:)

## Declaration

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

```swift
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

Discussion Asks the delegate to present an immersive environment.
