Function createElement

Create an element with a given tag name and optionally set its attributes

0.11.0

  • Parameters

    • tag: string

      tag name of the element to create

    • s: SignalLike<boolean>

      insert if SignalLike evalutes to true, otherwise ignore

    • Optionalwhere: InsertPosition = 'beforeend'

      position to insert the template relative to the target element ('beforebegin', 'afterbegin', 'beforeend', 'afterend')

    • Optionalattributes: Record<string, string> = {}

      attributes to set on the element

    • Optionaltext: string

      text content to set on the element

    Returns (host: UIElement<{}>, target: Element, index: number) => void

MMNEPVFCICPMFPCPTTAAATR