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