Skip to content

pantoken-root / formats/scope/src / observeScope

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

observeScope(target, listener): () => void

Բետա

Call listener երբ էլի փոխվի վրա target-ի համար հաշվված շրջանակը, ներառյալ այն պահերը, երբ նախորդի attributes փոխվում են։

Պարամետրեր ​

target ​

Element

listener ​

(scope) => void

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

AI գործողություն։

() => void

Օրինակ ​

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

const stop = observeScope(el, (scope) => render(scope.theme, scope.scheme));