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

# didOpenWindow(_:)

Called by the app when a new window is opened to fire appropriate events with only this extension.

## Declaration

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

## Parameters

- `newWindow`: The newly opened window.

## Discussion

Discussion This method informs only the specific extension of the opening of a new window. If the intention is to inform all loaded extensions consistently, you should use the respective method on the extension controller instead.

## See Also

### Related Documentation

- [didCloseWindow(_:)](webkit/wkwebextensioncontext/didclosewindow(_:).md)
- [openWindows](webkit/wkwebextensioncontext/openwindows.md)
