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

# windowType(for:)

Called when the type of the window is needed.

## Declaration

```swift
optional func windowType(for context: WKWebExtensionContext) -> WKWebExtension.WindowType
```

## Parameters

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

## Discussion

Discussion Defaults toWKWebExtension.WindowType.normal if not implemented.
