@microsoft/fast-element > PropertyChangeNotifier

PropertyChangeNotifier class

An implementation of Notifier that allows subscribers to be notified of individual property changes on an object.

Signature:

export declare class PropertyChangeNotifier implements Notifier 

Implements: Notifier

Constructors

Constructor

Modifiers

Description

(constructor)(subject)

Creates an instance of PropertyChangeNotifier for the specified subject.

Properties

Property

Modifiers

Type

Description

subject

readonly

any

The subject that property changes are being notified for.

Methods

Method

Modifiers

Description

notify(propertyName)

Notifies all subscribers, based on the specified property.

subscribe(subscriber, propertyToWatch)

Subscribes to notification of changes in an object's state.

unsubscribe(subscriber, propertyToUnwatch)

Unsubscribes from notification of changes in an object's state.