jkarpago wrote:
I need to find what control is in some position given.
I mean, if I give the values left: 200px and top 300px I need to know
what control in the page is in that position, or if there is not any.
You will need a bubbling event, then evaluate its event target in its event
listener. If that target is the element on which you are listening for
the event, none of its descendants handled it. Otherwise, the computed
coordinates of the handling descendant indicate its location. This
approach is efficient (AIUI, O(1)) but unprecise insofar that more than
one element can be at that position, and only the topmost element this
event applies to will be identified as event target.
Another more precise approach is to compute the area each element covers,
and then run a comparison for each element, in O(n).
Bottom line:
Describe what you are up to, not what you /think/ you need to know to do it.
PointedEars