Call me slow, but I just discovered that HTML 4 and 5 support onclick events on objects. So on the row of a table you can add this to the <tr> tag:
<tr onclick="my_row(nnn)">
where nnn is the row number.
In your Javascript you add a function that looks like this:
function my_row(n) {
Shiny.onInputChange("js.row", n);
};
In your Shiny code you add an observer that looks for changes on input$js.row:
observeEvent(input$js.row, {
print(paste0("Value of js.row is ", input$js.row))
})
That seems to work.
Tom