---
title: "JSContextGetGlobalContext(_:)"
framework: javascriptcore
role: symbol
role_heading: Function
path: "javascriptcore/jscontextgetglobalcontext(_:)"
---

# JSContextGetGlobalContext(_:)

Gets the global context of a JavaScript execution context.

## Declaration

```swift
func JSContextGetGlobalContext(_ ctx: JSContextRef!) -> JSGlobalContextRef!
```

## Parameters

- `ctx`: The JSContextRef with the global context you want to get.

## Return Value

Return Value The global context of ctx.
