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

# webViewFocus(_:)

Brings a web view’s window to the front and makes it the active window.

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

## Parameters

`sender`

The web view that sent the message.

## Discussion

By default, this method brings a web view’s window into focus. If you display multiple web views in a window then you might also want to focus the input on `sender`, using [`webView(_:makeFirstResponder:)`](/documentation/WebKit/WebUIDelegate/webView(_:makeFirstResponder:)).

---

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)