DomDropDownElementBuilder class

Extends

DomElementBuilder<HTMLAnchorElement>

Index

Constructors

Protected Properties

Public Methods

Constructors


constructor

⊕ new DomDropDownElementBuilder(parent?: HTMLElement): DomDropDownElementBuilder

Parameters:

  • parent: HTMLElement, Optional

Protected Properties


_onGetMenu

● _onGetMenu: () => PopupMenu


_onItemSelected

● _onItemSelected: (id: string) => void


element

● element: HTMLAnchorElement


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:

  • tag: "input"
  • childBuilder: (builder: DomInputElementBuilder) => void, Optional

Returns this

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

Parameters:

  • tag: "select"
  • childBuilder: (builder: DomSelectElementBuilder) => void, Optional

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


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, Optional

Returns this


hide

▸ hide(toHide?: boolean): this

Parameters:

  • toHide: boolean, Optional

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


onGetMenu

▸ onGetMenu(onGetMenu: () => PopupMenu): this

Parameters:

Returns this


onItemSelected

▸ onItemSelected(onItemSelected: (id: string) => void): this

Parameters:

  • onItemSelected: (id: string) => void

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(): HTMLAnchorElement

Returns HTMLAnchorElement


toggleClass

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

Parameters:

  • className: string
  • force: boolean, Optional

Returns this


visible

▸ visible(isVisible?: boolean): this

Parameters:

  • isVisible: boolean, Optional

Returns this