<!--
{
  "availability" : [
    "macOS: 10.3.0 - 10.14.0"
  ],
  "documentType" : "symbol",
  "framework" : "WebKit",
  "identifier" : "/documentation/WebKit/WebUIDelegate/webViewRunModal(_:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "WebKit"
    ],
    "preciseIdentifier" : "c:objc(pl)WebUIDelegate(im)webViewRunModal:"
  },
  "title" : "webViewRunModal(_:)"
}
-->

# webViewRunModal(_:)

Displays a web view in a modal window.

```
optional func webViewRunModal(_ sender: WebView!)
```

## Parameters

`sender`

The web view that sent the message.

## Discussion

This method should display and order front a modal window containing the specified web view. This method is invoked after the [`webView(_:createWebViewModalDialogWith:)`](/documentation/WebKit/WebUIDelegate/webView(_:createWebViewModalDialogWith:)) method is used to create a new window.

---

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)