(label, clickHandler)
| 227 | } |
| 228 | |
| 229 | static button(label, clickHandler) { |
| 230 | const button = DOM.element('button'); |
| 231 | button.innerText = label; |
| 232 | if (typeof clickHandler != 'function') { |
| 233 | throw new Error( |
| 234 | `DOM.button: Expected function but got clickHandler=${clickHandler}`); |
| 235 | } |
| 236 | button.onclick = clickHandler; |
| 237 | return button; |
| 238 | } |
| 239 | |
| 240 | static div(options) { |
| 241 | return this.element('div', options); |
no test coverage detected