Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

getElementFromPoint(x,y) - whaaaat?

I have definitely used this code before, but this time around it throws an error.

My code:

$(document).click(function (e) {
  var getPoint = document.getElementFromPoint(e.pageX,e.pageY);
  alert(getPoint);
});

And I get the following Error:

document.getElementFromPoint is not a function
like image 354
Barrie Reader Avatar asked Dec 28 '22 05:12

Barrie Reader


1 Answers

In Firefox this function is called document.elementFromPoint()

https://developer.mozilla.org/En/DOM:document.elementFromPoint

like image 81
tautologe Avatar answered Dec 31 '22 15:12

tautologe