Skip to content

pantoken-root / formats/scope/src / createScope

Swyddogaeth: createScope() ​

createScope(element, options?): PantokenScope

Bêta

Creu cwmpas wedi'i wreiddio yn element .

Paramedrau ​

element ​

HTMLElement

options? ​

CreateScopeOptions = {}

Yn dychwelyd ​

PantokenScope

Enghraifft ​

Dwy thema annibynnol ar un dudalen

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