A virtual node which represents plain text content.

Notes

User code will not typically create a VirtualText node directly. Instead, the h() function will be used to create an element tree.

Constructors

Properties

Constructors

  • Construct a new virtual text node.

    Parameters

    • content: string

      The text content for the node.

    Returns VirtualText

Properties

content: string

The text content for the node.

type: "text" = ...

The type of the node.

This value can be used as a type guard for discriminating the VirtualNode union type.