@microsoft/fast-element > SyntheticView

SyntheticView interface

A view representing a range of DOM nodes which can be added/removed ad hoc.

Signature:

export interface SyntheticView extends View 

Properties

Property Type Description
firstChild Node The first DOM node in the range of nodes that make up the view.
lastChild Node The last DOM node in the range of nodes that make up the view.

Methods

Method Description
dispose() Removes the view and unbinds its behaviors, disposing of DOM nodes afterward. Once a view has been disposed, it cannot be inserted or bound again.
insertBefore(node) Inserts the view's DOM nodes before the referenced node.
remove() Removes the view's DOM nodes. The nodes are not disposed and the view can later be re-inserted.