Here are two things to avoid when possible:
- HTML: Prefer Create table using JavaScript
- i.e.
const table = document.createElement("table")
etc.
- i.e.
- MutationObserver: Prefer adding the event during creation, e.g.:
table.addEventListener("mousedown", function cancel(e){ e.stopPropagation() })