Skip to content

DomInputElementBuilder class

DomElementBuilder<HTMLInputElement>


⊕ new DomInputElementBuilder(element?: HTMLInputElement,parent?: HTMLElement): DomInputElementBuilder

  • element: HTMLInputElement, Optional
  • parent: HTMLElement, Optional


● element: HTMLInputElement



● element: HTMLInputElement



▸ addChild(tag: "div",childBuilder?: (builder: DomElementBuilder<HTMLDivElement>) => void): this

  • tag: "div"
  • childBuilder: (builder: DomElementBuilder<HTMLDivElement>) => void, Optional

Returns this

▸ addChild(tag: "button",childBuilder?: (builder: DomElementBuilder<HTMLButtonElement>) => void): this

  • tag: "button"
  • childBuilder: (builder: DomElementBuilder<HTMLButtonElement>) => void, Optional

Returns this

▸ addChild(tag: "a",childBuilder?: (builder: DomElementBuilder<HTMLAnchorElement>) => void): this

  • tag: "a"
  • childBuilder: (builder: DomElementBuilder<HTMLAnchorElement>) => void, Optional

Returns this

▸ addChild(tag: "img",childBuilder?: (builder: DomElementBuilder<HTMLImageElement>) => void): this

  • tag: "img"
  • childBuilder: (builder: DomElementBuilder<HTMLImageElement>) => void, Optional

Returns this

▸ addChild(tag: "input",childBuilder?: (builder: DomInputElementBuilder) => void): this

Returns this

▸ addChild(tag: "dropdown",childBuilder?: (builder: DomDropDownElementBuilder) => void): this

Returns this

▸ addChild(tag: string,childBuilder?: (builder: DomElementBuilder<HTMLElement>) => void): this

  • tag: string
  • childBuilder: (builder: DomElementBuilder<HTMLElement>) => void, Optional

Returns this


▸ addChildElement(element: HTMLElement): this

  • element: HTMLElement

Returns this


▸ addClass(className: string,classNames: string[]): this

  • className: string
  • classNames: string[]

Returns this


▸ addHtml(html: string): this

  • html: string

Returns this


▸ addText(text: string): this

  • text: string

Returns this


▸ appendTo(parent: HTMLElement): this

  • parent: HTMLElement

Returns this


▸ attr(attrId: string,attrValue: string): this

  • attrId: string
  • attrValue: string

Returns this


▸ clear(): void

Returns void


▸ data(dataId: string,dataValue?: string): this

  • dataId: string
  • dataValue: string, Default value = null

Returns this


▸ hide(toHide?: boolean): this

  • toHide: boolean, Default value = true

Returns this


▸ html(html: string): this

  • html: string

Returns this


▸ id(value: string): this

  • value: string

Returns this


▸ isVisible(): boolean

Returns boolean


▸ name(value: string): this

  • value: string

Returns this


▸ off(eventType: string,listener: (event: Event, options?: boolean | AddEventListenerOptions) => any): this

  • eventType: string
  • listener: (event: Event, options?: boolean | AddEventListenerOptions) => any

Returns this


▸ on(eventType: string,listener: (event: Event, options?: boolean | AddEventListenerOptions) => any): this

  • eventType: string
  • listener: (event: Event, options?: boolean | AddEventListenerOptions) => any

Returns this


▸ removeClass(className: string,classNames: string[]): this

  • className: string
  • classNames: string[]

Returns this


▸ removeStyle(styleId: string): this

  • styleId: string

Returns this


▸ setStyle(styleId: string,styleValue: string): this

  • styleId: string
  • styleValue: string

Returns this


▸ show(): this

Returns this


▸ size(value: number): this

  • value: number

Returns this


▸ text(text: string): this

  • text: string

Returns this


▸ title(value: string): this

  • value: string

Returns this


▸ toDOM(): HTMLInputElement

Returns HTMLInputElement


▸ toggleClass(className: string,force?: boolean): this

  • className: string
  • force: boolean, Default value = undefined

Returns this


▸ type(value: string): this

  • value: string

Returns this


▸ value(value: string | number | Date): this

  • value: string | number | Date

Returns this