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

# screenFrame(for:)

Called when the screen frame containing the window is needed.

## Declaration

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

## Parameters

- `context`: The context associated with the running web extension.

## Discussion

Discussion Defaults to CGRectNull if not implemented.
