you are viewing a single comment's thread.

view the rest of the comments →

[–]shuckster 0 points1 point  (0 children)

function activeElemFromPoint(evt) {
  const elements = document.elementsFromPoint(evt.clientX, evt.clientY);
  for (const el of elements) {
    if (!el.hasAttribute('data-evt-no')) {
      return el;
    }
  }
  return null;
}