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

# frame(for:)

Called when the frame of the window is needed.

## Declaration

```swift
optional func frame(for context: WKWebExtensionContext) -> CGRect
```

## Parameters

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

## Discussion

Discussion Defaults to CGRectNull if not implemented.
