---
title: "window(for:)"
framework: webkit
role: symbol
role_heading: Instance Method
path: "webkit/wkwebextensiontab/window(for:)"
---

# window(for:)

Called when the window containing the tab is needed.

## Declaration

```swift
optional func window(for context: WKWebExtensionContext) -> (any WKWebExtensionWindow)?
```

## Parameters

- `context`: The context in which the web extension is running.

## Discussion

Discussion Defaults to nil if not implemented.
