Skip to content

pantoken-root / formats/scope/src / observeScope

Feidhm: observeScope() ​

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

Béite

Call listener gach uair a athraíonn an scóip réitithe do target, lena n-áirítear nuair a athraíonn tréithe a shinsir attributes change.

Paraiméadair ​

target ​

Element

listener ​

(scope) => void

Tuairisceáin ​

Gníomhaíocht AI.

() => void

Sampla ​

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

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