My current code
document.addEventListener('click', function(event) {
console.log(event.pageX + "-" + event.pageY);
});
however, there is a zoom set on the body (although I do not control it, sometimes it is not), and event.pageX and event.pageY do not work correctly.
Is there a way to get a relative value or something else?
Edit:
Css on body
body {
zoom: 0.485417;
}
The scaling value can change (as part of some external JS - I have no control over this value, my JS does not set it, and it can change)
source
share