@microsoft/fast-element > NodeObservationDirective

NodeObservationDirective class

A base class for node observation.

Signature:

export declare abstract class NodeObservationDirective<T extends NodeBehaviorOptions> extends StatelessAttachedAttributeDirective<T> 

Extends: StatelessAttachedAttributeDirective<T>

Remarks

Internally used by the SlottedDirective and the ChildrenDirective.

Properties

Property

Modifiers

Type

Description

id

string

The unique id of the factory.

targetNodeId

string

The structural id of the DOM node to which the created behavior will apply.

Methods

Method

Modifiers

Description

bind(controller)

Bind this behavior to the source.

computeNodes(target)

protected

Computes the set of nodes that should be assigned to the source property.

disconnect(target)

protected

abstract

Disconnects observation of the nodes.

getNodes(target)

protected

abstract

Retrieves the raw nodes that should be assigned to the source property.

getSource(target)

protected

Gets the data source for the target.

observe(target)

protected

abstract

Begins observation of the nodes.

unbind(controller)

Unbinds this behavior from the source.

updateTarget(source, value)

protected

Updates the source property with the computed nodes.