<!--
{
  "availability" : [
    "iOS: 16.0.0 -",
    "iPadOS: 16.0.0 -",
    "macCatalyst: 13.0.0 -",
    "macOS: 10.5.0 -",
    "tvOS: 9.0.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "JavaScriptCore",
  "identifier" : "/documentation/JavaScriptCore/JSGlobalContextRef",
  "metadataVersion" : "0.1.0",
  "role" : "Type Alias",
  "symbol" : {
    "kind" : "Type Alias",
    "modules" : [
      "JavaScriptCore"
    ],
    "preciseIdentifier" : "c:@T@JSGlobalContextRef"
  },
  "title" : "JSGlobalContextRef"
}
-->

# JSGlobalContextRef

A global JavaScript execution context.

```
typealias JSGlobalContextRef = OpaquePointer
```

## Discussion

A [`JSGlobalContextRef`](/documentation/JavaScriptCore/JSGlobalContextRef) is a [`JSContextRef`](/documentation/JavaScriptCore/JSContextRef).

## Topics

### Creating a global context

[`JSGlobalContextCreate(_:)`](/documentation/JavaScriptCore/JSGlobalContextCreate(_:))

Creates a global JavaScript execution context.

[`JSGlobalContextCreateInGroup(_:_:)`](/documentation/JavaScriptCore/JSGlobalContextCreateInGroup(_:_:))

Creates a global JavaScript execution context in the provided context group.

[`JSGlobalContextRetain(_:)`](/documentation/JavaScriptCore/JSGlobalContextRetain(_:))

Retains a global JavaScript execution context.

[`JSGlobalContextRelease(_:)`](/documentation/JavaScriptCore/JSGlobalContextRelease(_:))

Releases a global JavaScript execution context.

### Managing the context’s name

[`JSGlobalContextCopyName(_:)`](/documentation/JavaScriptCore/JSGlobalContextCopyName(_:))

Gets a copy of the name of a context.

[`JSGlobalContextSetName(_:_:)`](/documentation/JavaScriptCore/JSGlobalContextSetName(_:_:))

Sets the remote debugging name for a context.

### Making a context inspectable

[`JSGlobalContextIsInspectable(_:)`](/documentation/JavaScriptCore/JSGlobalContextIsInspectable(_:))

Returns a Boolean value that indicates whether the JavaScript context is inspectable.

[`JSGlobalContextSetInspectable(_:_:)`](/documentation/JavaScriptCore/JSGlobalContextSetInspectable(_:_:))

Sets a JavaScript context to be either inspectable or not inspectable.



---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)