I have a page with a table with rows. Each row has...
# htmx-general
p
I have a page with a table with rows. Each row has a button to show more info in an off-canvas and there is a filter select at the top of the table. Both the filter and the buttons are powered by htmx. I now want to add error and timeout handling for both. I am wondering what the best way is (or if it does not matter). I could do
document.addEventListener(...)
and somehow use something from the event to know if it is a request coming from the filter or for the off-canvas (because the way I will display errors is different). Or is it better to add the event listener to each of the action buttons of the table rows, and to the filter select all separately. So I already know what request is failing? I am just wondering if adding many event listeners would have a negative impact on performance?