Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface ElementFactory<T, B>

Variadic element factory function. Takes an element specific attrib object (or null if no user attribs are needed) and any number of arbitrary body elements (unless children are explicitly disallowed as is the case for some HTML elements).

Optionally, an Emmet-style string in the form #id.class1.class2 or .class1.class2 can be given as first argument.

Returns element as hiccup tuple, e.g. ["tag", attribs|null, ...body]

Type parameters

  • T

  • B

Hierarchy

  • ElementFactory

Callable

  • __call(attribs?: Nullable<T>, ...body: B[]): [string, Nullable<T>]
  • __call(emmet: string, attribs?: Nullable<T>, ...body: B[]): [string, Nullable<T>]
  • Variadic element factory function. Takes an element specific attrib object (or null if no user attribs are needed) and any number of arbitrary body elements (unless children are explicitly disallowed as is the case for some HTML elements).

    Optionally, an Emmet-style string in the form #id.class1.class2 or .class1.class2 can be given as first argument.

    Returns element as hiccup tuple, e.g. ["tag", attribs|null, ...body]

    Parameters

    • Optional attribs: Nullable<T>
    • Rest ...body: B[]

    Returns [string, Nullable<T>]

  • Variadic element factory function. Takes an element specific attrib object (or null if no user attribs are needed) and any number of arbitrary body elements (unless children are explicitly disallowed as is the case for some HTML elements).

    Optionally, an Emmet-style string in the form #id.class1.class2 or .class1.class2 can be given as first argument.

    Returns element as hiccup tuple, e.g. ["tag", attribs|null, ...body]

    Parameters

    • emmet: string
    • Optional attribs: Nullable<T>
    • Rest ...body: B[]

    Returns [string, Nullable<T>]

Generated using TypeDoc