---
title: "JSContextGroupRetain(_:)"
framework: javascriptcore
role: symbol
role_heading: Function
path: "javascriptcore/jscontextgroupretain(_:)"
---

# JSContextGroupRetain(_:)

Retains a JavaScript context group.

## Declaration

```swift
func JSContextGroupRetain(_ group: JSContextGroupRef!) -> JSContextGroupRef!
```

## Parameters

- `group`: The doc://com.apple.javascriptcore/documentation/JavaScriptCore/JSContextGroupRef to retain.

## Return Value

Return Value A JSContextGroupRef that is the same as group.

## See Also

### Creating a Context Group

- [JSContextGroupCreate()](javascriptcore/jscontextgroupcreate().md)
- [JSContextGroupRelease(_:)](javascriptcore/jscontextgrouprelease(_:).md)
