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

# Interface: PantokenScope

Beta

A live scope bound to one element.

## Properties

### element

> `readonly` **element**: `HTMLElement`

Beta

The element carrying the scope attributes.

***

### instanceId

> `readonly` **instanceId**: `string`

Beta

The instance this scope belongs to.

## Methods

### get()

> **get**(): [`ScopeConfig`](ScopeConfig.md)

Beta

The scope's own configuration — what it declares, not what it inherits.

#### Returns

[`ScopeConfig`](ScopeConfig.md)

***

### set()

> **set**(`patch`): `void`

Beta

Merge a partial configuration in. Pass `null` for a field to clear it and inherit again.

#### Parameters

##### patch

`Partial`<`Record`\<keyof [`ScopeConfig`](ScopeConfig.md), `string` | `null` | `undefined`>>

#### Returns

`void`

***

### resolve()

> **resolve**(`el?`): [`ResolvedScope`](ResolvedScope.md)

Beta

Resolve the effective scope for a descendant (defaults to this scope's own element).

#### Parameters

##### el?

`Element`

#### Returns

[`ResolvedScope`](ResolvedScope.md)

***

### attachFrame()

> **attachFrame**(`frame`): () => `void`

Beta

Send this scope's state to `frame` and keep it in sync. Returns a detach function.

#### Parameters

##### frame

`HTMLIFrameElement`

#### Returns

() => `void`

***

### subscribe()

> **subscribe**(`listener`): () => `void`

Beta

Observe changes. Returns an unsubscribe function.

#### Parameters

##### listener

(`config`) => `void`

#### Returns

() => `void`

***

### destroy()

> **destroy**(): `void`

Beta

Remove the attributes, detach frames, and unregister.

#### Returns

`void`
