Options
All
  • Public
  • Public/Protected
  • All
Menu

Element creator which supports custom elements (ie. elements starting with uppercase letters that are implemented in terms of lower level elements).

Hierarchy

  • CustomElementCreator

Implements

Index

Constructors

constructor

Methods

Private appendChild

  • appendChild(parent: HTMLElement, child: string | HTMLElement | (string | HTMLElement)[]): void
  • Parameters

    • parent: HTMLElement
    • child: string | HTMLElement | (string | HTMLElement)[]

    Returns void

create

  • create(tag: string | (new () => CustomElement), props: null | Props, children: HTMLElement[]): HTMLElement
  • Create an HTML element from a JSX tag

    Parameters

    Returns HTMLElement

Private createIfCustom

  • createIfCustom(tag: new () => CustomElement, props: null | Props, children: HTMLElement[]): HTMLElement

Private createIfNotCustom

  • createIfNotCustom(tag: string, props: null | Props, children: HTMLElement[]): HTMLElement
  • Parameters

    • tag: string
    • props: null | Props
    • children: HTMLElement[]

    Returns HTMLElement

Private removeOnFromEvent

  • removeOnFromEvent(onEvent: string): string
  • Removes the "on" from the name of an event, eg. "onClick" => "click"

    Parameters

    • onEvent: string

    Returns string

Generated using TypeDoc