Skip to content

pantoken-root / formats/scope/src / createScope

Ֆունկցիա: createScope() ​

createScope(element, options?): PantokenScope

Բետա

Ստեղծել սպեկտր արմատավորված element։

Պարամետրեր ​

element ​

HTMLElement

options? ​

CreateScopeOptions = {}

Վերադարձվող արժեք ​

PantokenScope

Օրինակ ​

ԵՐԿՈՒ անկախ թեմա մեկ էջում

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

createScope(document.querySelector("#app")!, { theme: "rebrand", scheme: "dark" });
createScope(document.querySelector("#preview")!, {
  instanceId: "preview",
  theme: "canvas",
  scheme: "light",
  boundary: true,
});