Skip to content

pantoken-root / formats/scope/src / PantokenScope

Interfáhta: PantokenScope ​

Behta

A live scope bound to one element.

Properties ​

element ​

readonly element: HTMLElement

Behta

The element carrying the scope attributes.


instanceId ​

readonly instanceId: string

Behta

Produktta mii logga boađe.

Metodat ​

get() ​

get(): ScopeConfig

Behta

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

Gullii / Gávdnat ​

ScopeConfig


set() ​

set(patch): void

Behta

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

Parametera ​

patch ​

Partial<Record<keyof ScopeConfig, string | null | undefined>>

Gullii / Gávdnat ​

void


resolve() ​

resolve(el?): ResolvedScope

Behta

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

Parametera ​

el? ​

Element

Gullii / Gávdnat ​

ResolvedScope


attachFrame() ​

attachFrame(frame): () => void

Behta

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

Parametera ​

frame ​

HTMLIFrameElement

Gullii / Gávdnat ​

() => void


subscribe() ​

subscribe(listener): () => void

Behta

Observe changes. Returns an unsubscribe function.

Parametera ​

listener ​

(config) => void

Gullii / Gávdnat ​

() => void


destroy() ​

destroy(): void

Behta

Remove the attributes, detach frames, and unregister.

Gullii / Gávdnat ​

void