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

# isPrivate(for:)

Called when the private state of the window is needed.

## Declaration

```swift
optional func isPrivate(for context: WKWebExtensionContext) -> Bool
```

## Parameters

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

## Discussion

Discussion Defaults to NO if not implemented. This value is cached and will not change for the duration of the window or its contained tabs. note: To ensure proper isolation between private and non-private data, web views associated with private data must use a different WKUserContentController. Likewise, to be identified as a private web view and to ensure that cookies and other website data are not shared, private web views must be configured to use a non-persistent WKWebsiteDataStore.
