---
title: "webViewFocus(_:)"
framework: webkit
role: symbol
role_heading: Instance Method
path: "webkit/webuidelegate/webviewfocus(_:)"
---

# webViewFocus(_:)

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

## Declaration

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

## Parameters

- `sender`: The web view that sent the message.

## Discussion

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:).

## See Also

### Making Windows Key and Main

- [webViewUnfocus(_:)](webkit/webuidelegate/webviewunfocus(_:).md)
