Skip to content Skip to sidebar Skip to footer

Where Does This Mouseevent Property Come From?

I have this jsfiddle which reports the x,y coordinates of a white square that is being moved around by the mouse when the mouse button is released. http://jsfiddle.net/35z4J/115/ T

Solution 1:

The path is a property of the event object which contains all the ancestors in tree order.

See Dispatching events

If event’s target attribute value is participating in a tree, let event path be a static ordered list of all its ancestors in tree order, and let event path be the empty list otherwise.

So e.path[0] will refer to the element from where the event was originated. Then the Element has the offsetHeight property

Post a Comment for "Where Does This Mouseevent Property Come From?"