DomDropDownElementBuilder class
Extends
Section titled “Extends”DomElementBuilder<HTMLAnchorElement>
- addChild
- addChildElement
- addClass
- addHtml
- addText
- appendTo
- attr
- clear
- data
- hide
- html
- id
- isVisible
- off
- on
- onGetMenu
- onItemSelected
- removeClass
- removeStyle
- setStyle
- show
- text
- title
- toDOM
- toggleClass
- visible
Constructors
Section titled “Constructors”constructor
Section titled “constructor”⊕ new DomDropDownElementBuilder(parent?: HTMLElement): DomDropDownElementBuilder
Parameters:
Section titled “Parameters:”- parent:
HTMLElement, Optional
Protected Properties
Section titled “Protected Properties”_onGetMenu
Section titled “_onGetMenu”● _onGetMenu: () => PopupMenu
_onItemSelected
Section titled “_onItemSelected”● _onItemSelected: (id: string) => void
element
Section titled “element”● element: HTMLAnchorElement
Public Methods
Section titled “Public Methods”addChild
Section titled “addChild”▸ addChild(tag: "div",childBuilder?: (builder: DomElementBuilder<HTMLDivElement>) => void): this
Parameters:
Section titled “Parameters:”- tag:
"div" - childBuilder: (builder:
DomElementBuilder<HTMLDivElement>) =>void, Optional
Returns this
▸ addChild(tag: "button",childBuilder?: (builder: DomElementBuilder<HTMLButtonElement>) => void): this
Parameters:
Section titled “Parameters:”- tag:
"button" - childBuilder: (builder:
DomElementBuilder<HTMLButtonElement>) =>void, Optional
Returns this
▸ addChild(tag: "a",childBuilder?: (builder: DomElementBuilder<HTMLAnchorElement>) => void): this
Parameters:
Section titled “Parameters:”- tag:
"a" - childBuilder: (builder:
DomElementBuilder<HTMLAnchorElement>) =>void, Optional
Returns this
▸ addChild(tag: "img",childBuilder?: (builder: DomElementBuilder<HTMLImageElement>) => void): this
Parameters:
Section titled “Parameters:”- tag:
"img" - childBuilder: (builder:
DomElementBuilder<HTMLImageElement>) =>void, Optional
Returns this
▸ addChild(tag: "input",childBuilder?: (builder: DomInputElementBuilder) => void): this
Parameters:
Section titled “Parameters:”- tag:
"input" - childBuilder: (builder:
DomInputElementBuilder) =>void, Optional
Returns this
▸ addChild(tag: "select",childBuilder?: (builder: DomSelectElementBuilder) => void): this
Parameters:
Section titled “Parameters:”- tag:
"select" - childBuilder: (builder:
DomSelectElementBuilder) =>void, Optional
Returns this
▸ addChild(tag: string,childBuilder?: (builder: DomElementBuilder<HTMLElement>) => void): this
Parameters:
Section titled “Parameters:”- tag:
string - childBuilder: (builder:
DomElementBuilder<HTMLElement>) =>void, Optional
Returns this
addChildElement
Section titled “addChildElement”▸ addChildElement(element: HTMLElement): this
Parameters:
Section titled “Parameters:”- element:
HTMLElement
Returns this
addClass
Section titled “addClass”▸ addClass(className: string,classNames: string[]): this
Parameters:
Section titled “Parameters:”- className:
string - classNames:
string[]
Returns this
addHtml
Section titled “addHtml”▸ addHtml(html: string): this
Parameters:
Section titled “Parameters:”- html:
string
Returns this
addText
Section titled “addText”▸ addText(text: string): this
Parameters:
Section titled “Parameters:”- text:
string
Returns this
appendTo
Section titled “appendTo”▸ appendTo(parent: HTMLElement): this
Parameters:
Section titled “Parameters:”- parent:
HTMLElement
Returns this
▸ attr(attrId: string,attrValue: string): this
Parameters:
Section titled “Parameters:”- attrId:
string - attrValue:
string
Returns this
▸ clear(): void
Returns void
▸ data(dataId: string,dataValue?: string): this
Parameters:
Section titled “Parameters:”- dataId:
string - dataValue:
string, Optional
Returns this
▸ hide(toHide?: boolean): this
Parameters:
Section titled “Parameters:”- toHide:
boolean, Optional
Returns this
▸ html(html: string): this
Parameters:
Section titled “Parameters:”- html:
string
Returns this
▸ id(value: string): this
Parameters:
Section titled “Parameters:”- value:
string
Returns this
isVisible
Section titled “isVisible”▸ isVisible(): boolean
Returns boolean
▸ off(eventType: string,listener: (event: Event, options?: boolean | AddEventListenerOptions) => any): this
Parameters:
Section titled “Parameters:”- eventType:
string - listener: (event:
Event, options?:boolean|AddEventListenerOptions) =>any
Returns this
▸ on(eventType: string,listener: (event: Event, options?: boolean | AddEventListenerOptions) => any): this
Parameters:
Section titled “Parameters:”- eventType:
string - listener: (event:
Event, options?:boolean|AddEventListenerOptions) =>any
Returns this
onGetMenu
Section titled “onGetMenu”▸ onGetMenu(onGetMenu: () => PopupMenu): this
Parameters:
Section titled “Parameters:”- onGetMenu: () => PopupMenu
Returns this
onItemSelected
Section titled “onItemSelected”▸ onItemSelected(onItemSelected: (id: string) => void): this
Parameters:
Section titled “Parameters:”- onItemSelected: (id:
string) =>void
Returns this
removeClass
Section titled “removeClass”▸ removeClass(className: string,classNames: string[]): this
Parameters:
Section titled “Parameters:”- className:
string - classNames:
string[]
Returns this
removeStyle
Section titled “removeStyle”▸ removeStyle(styleId: string): this
Parameters:
Section titled “Parameters:”- styleId:
string
Returns this
setStyle
Section titled “setStyle”▸ setStyle(styleId: string,styleValue: string): this
Parameters:
Section titled “Parameters:”- styleId:
string - styleValue:
string
Returns this
▸ show(): this
Returns this
▸ text(text: string): this
Parameters:
Section titled “Parameters:”- text:
string
Returns this
▸ title(value: string): this
Parameters:
Section titled “Parameters:”- value:
string
Returns this
▸ toDOM(): HTMLAnchorElement
Returns HTMLAnchorElement
toggleClass
Section titled “toggleClass”▸ toggleClass(className: string,force?: boolean): this
Parameters:
Section titled “Parameters:”- className:
string - force:
boolean, Optional
Returns this
visible
Section titled “visible”▸ visible(isVisible?: boolean): this
Parameters:
Section titled “Parameters:”- isVisible:
boolean, Optional
Returns this