---
url: /api/formats/scope/src/functions/connectScope.md
---
[pantoken-root](../../../../index.md) / [formats/scope/src](../index.md) / connectScope

# Function: connectScope()

> **connectScope**(`options?`): () => `void`

Beta

Run inside a frame: ask the host page's scope for its state and follow it.

The frame gets its own scope element, so it can be told to render a different theme or scheme than
the host — it is not inheriting ambiently.

## Parameters

### options?

[`ConnectScopeOptions`](../interfaces/ConnectScopeOptions.md) = `{}`

## Returns

A disconnect function.

() => `void`
