Remove use of :has() from js as well.

This commit is contained in:
Fredrik Jonsson 2023-04-24 14:25:36 +02:00
commit 33c9642116

View file

@ -12,10 +12,11 @@
tables.forEach(function (table) {
const headers = table.querySelectorAll('th');
const rows = table.querySelectorAll('tr:has(td)');
const rows = table.querySelectorAll('tbody tr');
rows.forEach(function (row) {
const cells = row.querySelectorAll('td');
cells.forEach(function (cell, i) {
cell.setAttribute('role','cell');
if (headers[i].innerText) {
@ -25,5 +26,4 @@
});
});
})();