Skip to main content
Version: 2.x

SyntheticView interface

@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<TSource = any, TParent = any> extends View<TSource, TParent> 

Extends: View<TSource, TParent>

Properties

Property

Modifiers

Type

Description

firstChild

readonly

Node

The first DOM node in the range of nodes that make up the view.

lastChild

readonly

Node

The last DOM node in the range of nodes that make up the view.

Methods

Method

Description

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.