• Create a new virtual element node.

    Parameters

    • tag: string

      The tag name for the element.

    • Rest ...children: Child[]

      The children for the element, if any.

    Returns VirtualElement

    A new virtual element node for the given parameters.

    Notes

    The children may be string literals, other virtual nodes, null, or an array of those things. Strings are converted into text nodes, and arrays are inlined as if the array contents were given as positional arguments. This makes it simple to build up an array of children by any desired means. null child values are simply ignored.

    A bound function for each HTML tag name is available as a static function attached to the h() function. E.g. h('div', ...) is equivalent to h.div(...).

  • Parameters

    Returns VirtualElement

  • Parameters

    Returns VirtualElement

  • Parameters

    Returns VirtualElement