Skip to main content
Version: 2.x

Notifier interface

@microsoft/fast-element > Notifier

Notifier interface

Provides change notifications for an observed subject.

Signature:

export interface Notifier 

Properties

Property

Modifiers

Type

Description

subject

readonly

any

The object that subscribers will receive notifications for.

Methods

Method

Description

notify(args)

Notifies all subscribers, based on the args.

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.