(tagName: string, parentElement: HTMLElement)
| 8 | * @returns new HTMLElement. |
| 9 | */ |
| 10 | export function addEl(tagName: string, parentElement: HTMLElement) { |
| 11 | const el = document.createElement(tagName); |
| 12 | parentElement.appendChild(el); |
| 13 | return el; |
| 14 | } |
| 15 | |
| 16 | /** |
| 17 | * Create a new div HTMLElement as a child of another element. |