---
title: focusedWindow
framework: webkit
role: symbol
role_heading: Instance Property
path: webkit/wkwebextensioncontext/focusedwindow
---

# focusedWindow

The window that currently has focus for this extension.

## Declaration

```swift
weak var focusedWindow: (any WKWebExtensionWindow)? { get }
```

## Discussion

Discussion Provides the window that currently has focus, as set by the didFocusWindow(_:) method. It will be nil if no window has focus or if a window has focus that is not visible to the extension. Initially populated by the window returned by the extension controller delegate method webExtensionController(_:focusedWindowFor:).

## See Also

### Related Documentation

- [didFocusWindow(_:)](webkit/wkwebextensioncontext/didfocuswindow(_:).md)
