Type alias ElementSpecialAttrs

ElementSpecialAttrs: {
    className?: string;
    dataset?: ElementDataset;
    htmlFor?: string;
    key?: string;
    style?: ElementInlineStyle;
}

The special-cased attributes for a virtual element node.

Type declaration

  • Optional Readonly className?: string

    The JS-safe name for the HTML class attribute.

  • Optional Readonly dataset?: ElementDataset

    The dataset for the rendered DOM element.

  • Optional Readonly htmlFor?: string

    The JS-safe name for the HTML for attribute.

  • Optional Readonly key?: string

    The key id for the virtual element node.

    If a node is given a key id, the generated DOM node will not be recreated during a rendering update if it only moves among its siblings in the render tree.

    In general, reordering child nodes will cause the nodes to be completely re-rendered. Keys allow this to be optimized away.

    If a key is provided, it must be unique among sibling nodes.

  • Optional Readonly style?: ElementInlineStyle

    The inline style for the rendered DOM element.