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

# webViewFirstResponder(_:)

Returns the first responder of the web view’s window.

## Declaration

```swift
optional func webViewFirstResponder(_ sender: WebView!) -> NSResponder!
```

## Parameters

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

## Return Value

Return Value The view or subview that currently has the input focus. It can return nil or the default first responder if the sender is not attached to a window or if another view (not in the window) has the focus.

## See Also

### Working with the Responder Chain

- [webView(_:makeFirstResponder:)](webkit/webuidelegate/webview(_:makefirstresponder:).md)
