I created a simple event listener for clicks:
window.addEventListener("click", function (event) {
console.log(event);
});
From what I see, the event object contains a lot of useful data about the parent elements, HTML and CSS data of the clicked element.
Is there a way to build a CSS-selector (hopefully unique) from these event objects? If yes, are there any open-source solutions you can think of?