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

# parentTab(for:)

Called when the parent tab for the tab is needed.

## Declaration

```swift
optional func parentTab(for context: WKWebExtensionContext) -> (any WKWebExtensionTab)?
```

## Parameters

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

## Discussion

Discussion Defaults to nil if not implemented.

## See Also

### Related Documentation

- [setParentTab(_:for:completionHandler:)](webkit/wkwebextensiontab/setparenttab(_:for:completionhandler:).md)
