Skip to content

pantoken-root / formats/scope/src / resolveScope

Fonksyon: resolveScope() ​

resolveScope(start): ResolvedScope

Beta

Rezoud scope ki an efè pou start pa monte atravè zansèt li yo.

Paramèt ​

start ​

Element | null

Eleman pou rezoud pou li. Pwòp atribi li patisipe.

Retounen ​

ResolvedScope

The ResolvedScope; chan ki pa deklare pa okenn zansèt rete undefined.

Egzanp ​

ts
import { resolveScope } from "@pantoken/scope";

// <div data-pantoken-theme="canvas"><span id="x"></span></div>
resolveScope(document.querySelector("#x")!).theme; // "canvas"