js get element by X Y

JavaScript
window.scrollY + document.querySelector('#elementId').getBoundingClientRect().top // Y

window.scrollX + document.querySelector('#elementId').getBoundingClientRect().left // X
// get the element at a certain (x, y) position
var element = document.elementFromPoint(x, y);

// for a list of elements
var elements = document.elementsFromPoint(x, y);

.
Source

Also in JavaScript: