Say I have a webview with a page that is mostly unoccupied, but has some divs of the class “square.”
And then I have a random point, (100, 60) pixels. Is there a way I can find if this point is in/touches one of these divs?
Say I have a webview with a page that is mostly unoccupied, but has
Share
You would find the coordinates of all the elements which you want to check if the pixel is in. Add the element’s offsetHeight and offsetWidth to those coordinates, and you have a range that the pixel could be in. For each element, you need to check if the pixel is in that range.