With this table,
<table >
<colgroup>
<col class="classname1">
...
</colgroup>
<thead>
<tr>
<th class="classname2" scope="col">title</th>
...
</tr>
</thead>
<tbody>
I can get the class name specified explicitly on the table header (th) by calling
th = document.querySelector...
th.classList // contains classname2 but not classname1
Given th, I want to obtain all classnames that apply. How can I get the class names specified in the corresponding colgroup?
An approach was to retrieve ...
within a first step the column specific class-names (as array of class-name arrays) while also taking a col-elements
span-property into account.and within a final step, while iterating the direct child-elements of a specific table-row, to create the array of each child-element's effective class-names array by merging the current element's class-names with the class-names of its related col-element (this time taking into account a child-element's
colSpan-property).