---
title: "didOpenWindow(_:)"
framework: webkit
role: symbol
role_heading: Instance Method
path: "webkit/wkwebextensioncontroller/didopenwindow(_:)"
---

# didOpenWindow(_:)

Should be called by the app when a new window is opened to fire appropriate events with all loaded web extensions.

## Declaration

```swift
func didOpenWindow(_ newWindow: any WKWebExtensionWindow)
```

## Parameters

- `newWindow`: The newly opened window.

## Discussion

Discussion This method informs all loaded extensions of the opening of a new window, ensuring consistent understanding across extensions. If the intention is to inform only a specific extension, you should use the respective method on that extension’s context instead.

## See Also

### Related Documentation

- [didCloseWindow(_:)](webkit/wkwebextensioncontroller/didclosewindow(_:).md)
