<!--
{
  "availability" : [
    "iOS: 8.0.0 -",
    "iPadOS: 8.0.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.10.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "WebKit",
  "identifier" : "/documentation/WebKit/WKUIDelegate/webView(_:createWebViewWith:for:windowFeatures:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "WebKit"
    ],
    "preciseIdentifier" : "c:objc(pl)WKUIDelegate(im)webView:createWebViewWithConfiguration:forNavigationAction:windowFeatures:"
  },
  "title" : "webView(_:createWebViewWith:for:windowFeatures:)"
}
-->

# webView(_:createWebViewWith:for:windowFeatures:)

Creates a new web view.

```
optional func webView(_ webView: WKWebView, createWebViewWith configuration: WKWebViewConfiguration, for navigationAction: WKNavigationAction, windowFeatures: WKWindowFeatures) -> WKWebView?
```

## Parameters

`webView`

The web view invoking the delegate method.

`configuration`

The configuration to use when creating the new web view.

`navigationAction`

The navigation action causing the new web view to be created.

`windowFeatures`

Window features requested by the webpage.

## Return Value

A new web view or `nil`.

## Discussion

The web view returned must be created with the specified configuration. WebKit loads the request in the returned web view.

---

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)