export function clearSelectedAttrs() { document.querySelectorAll( "table.viewer > tbody > tr > td > [selected='true']", ) .forEach((element) => element.setAttribute("selected", "")); } export function setSelectedAttr(row, column) { const tr = document.querySelectorAll("table.viewer > tbody > tr")[row]; if (tr) { const cell = [...tr.querySelectorAll(":scope > td > *")][column]; if (cell) { cell.setAttribute("selected", "true"); } } }