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

# size(for:)

Called when the size of the tab is needed.

## Declaration

```swift
optional func size(for context: WKWebExtensionContext) -> CGSize
```

## Parameters

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

## Discussion

Discussion Defaults to size of the tab’s web view if not implemented.
