+export function buildColgroupFromTableWidths(colWidths: string[]): HTMLElement|null {
+ if (colWidths.length === 0) {
+ return null
+ }
+
+ const colgroup = el('colgroup');
+ for (const width of colWidths) {
+ const col = el('col');
+ if (width) {
+ col.style.width = width;
+ }
+ colgroup.append(col);
+ }
+
+ return colgroup;
+}
+