Skip to content

pantoken-root / formats/scope/src / createScope

Funkcija: createScope() ​

createScope(element, options?): PantokenScope

Beta

Ustvari obseg, ukoreninjen na element.

Parametri ​

element ​

HTMLElement

options? ​

CreateScopeOptions = {}

Vrne ​

PantokenScope

Primer ​

Dve neodvisni temi na eni strani**

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,
});