(
id: string|null, text: string, description: string,
action: (e: MouseEvent) => void)
| 7 | private htmlObject: HTMLInputElement; |
| 8 | |
| 9 | constructor( |
| 10 | id: string|null, text: string, description: string, |
| 11 | action: (e: MouseEvent) => void) { |
| 12 | this.text = text; |
| 13 | this.description = description; |
| 14 | const button = document.createElement(htmlTags.input) as HTMLInputElement; |
| 15 | button.type = htmlInputTypes.submit; |
| 16 | button.value = this.text; |
| 17 | button.title = this.description; |
| 18 | if (id) { |
| 19 | button.id = id; |
| 20 | } |
| 21 | button.addEventListener('click', action); |
| 22 | this.htmlObject = button; |
| 23 | } |
| 24 | |
| 25 | appendHtml(container: HTMLElement): this { |
| 26 | container.appendChild(this.htmlObject); |
nothing calls this directly
no outgoing calls
no test coverage detected