(row: HTMLElement, prop: string, currentVal: string, options: string[])
| 439 | } |
| 440 | |
| 441 | function buildSelectControl(row: HTMLElement, prop: string, currentVal: string, options: string[]) { |
| 442 | const sel = document.createElement("select"); |
| 443 | sel.className = "prop-input"; |
| 444 | for (const opt of options) { |
| 445 | const o = document.createElement("option"); |
| 446 | o.value = opt; |
| 447 | o.textContent = opt; |
| 448 | if (opt === currentVal) o.selected = true; |
| 449 | sel.appendChild(o); |
| 450 | } |
| 451 | sel.addEventListener("change", () => commitStyle(prop, sel.value || null)); |
| 452 | row.appendChild(sel); |
| 453 | } |
| 454 | |
| 455 | function buildTextControl( |
| 456 | row: HTMLElement, |
no test coverage detected