Skip to main content
Version: 1.x

@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

PropertyTypeDescription
firstChildNodeThe first DOM node in the range of nodes that make up the view.
lastChildNodeThe last DOM node in the range of nodes that make up the view.

Methods

MethodDescription
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.