Why not just use the 'dataset' property of the element itself? Then you can use querySelectorAll to find your selected rows automatically:
node.querySelectorAll('tr[data-selected="true"]');
In other words.. "use the DOM to handle the DOM."