DomSelectElementBuilder class

Extends

DomElementBuilder<HTMLSelectElement>

Index

Constructors

Protected Properties

Public Methods

Constructors


constructor

⊕ new DomSelectElementBuilder(element?: HTMLSelectElement,parent?: HTMLElement): DomSelectElementBuilder

Parameters:

  • element: HTMLSelectElement, Optional
  • parent: HTMLElement, Optional

Protected Properties


element

● element: HTMLSelectElement


Public Methods


addChild

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

Parameters:

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

Returns this

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

Parameters:

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

Returns this

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

Parameters:

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

Returns this

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

Parameters:

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

Returns this

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

Parameters:

Returns this

▸ addChild(tag: "select",childBuilder?: (builder: DomSelectElementBuilder) => void): this

Parameters:

Returns this

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

Parameters:

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

Returns this


addChildElement

▸ addChildElement(element: HTMLElement): this

Parameters:

  • element: HTMLElement

Returns this


addClass

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

Parameters:

  • className: string
  • classNames: string[]

Returns this


addHtml

▸ addHtml(html: string): this

Parameters:

  • html: string

Returns this


addOption

▸ addOption(value: any | string): DomSelectElementBuilder

Parameters:

  • value: any | string

Returns DomSelectElementBuilder


addText

▸ addText(text: string): this

Parameters:

  • text: string

Returns this


appendTo

▸ appendTo(parent: HTMLElement): this

Parameters:

  • parent: HTMLElement

Returns this


attr

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

Parameters:

  • attrId: string
  • attrValue: string

Returns this


clear

▸ clear(): void

Returns void


data

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

Parameters:

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

Returns this


hide

▸ hide(toHide?: boolean): this

Parameters:

  • toHide: boolean, Default value = true

Returns this


html

▸ html(html: string): this

Parameters:

  • html: string

Returns this


id

▸ id(value: string): this

Parameters:

  • value: string

Returns this


isVisible

▸ isVisible(): boolean

Returns boolean


off

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

Parameters:

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

Returns this


on

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

Parameters:

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

Returns this


removeClass

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

Parameters:

  • className: string
  • classNames: string[]

Returns this


removeStyle

▸ removeStyle(styleId: string): this

Parameters:

  • styleId: string

Returns this


setStyle

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

Parameters:

  • styleId: string
  • styleValue: string

Returns this


show

▸ show(): this

Returns this


text

▸ text(text: string): this

Parameters:

  • text: string

Returns this


title

▸ title(value: string): this

Parameters:

  • value: string

Returns this


toDOM

▸ toDOM(): HTMLSelectElement

Returns HTMLSelectElement


toggleClass

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

Parameters:

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

Returns this


visible

▸ visible(isVisible?: boolean): this

Parameters:

  • isVisible: boolean, Default value = true

Returns this