As i understand, when i click the left mouse button, event 'mousedown' is pushed into the event loop queue. This event has recorded coordinates at the moment of click. Every 'mousedown' event has an event target that is the deepest nested element under the 'mousedown' coordinates. Also there is a so called process of dispatching an event. In short, its a process of defining a target of the event, all of its ancestors, and calling all event handlers in the defined order. Im trying to understand what the spec says about order of adding event to queue and dispatching them. When exactly event target is determined. Are events added to the queue even when they dont have event listeners. Where i can read about this process. Spec is very complicated.
Asked
Active
Viewed 108 times
2
-
@Pac0 i watched many videos about event queue, i ve read the spec about events, but i havent found answers – flasher1101 Sep 10 '19 at 09:23
-
I'm not sure it's specified in the JavaScript language specs ([EcmaScript specs](https://www.ecma-international.org/ecma-262/)), that sounds implementation (browser or other engine) dependent. At least, looking at the titles on the left of the link, I don't easily see anything related to event queue. – Pac0 Sep 10 '19 at 09:31
-
Actually, something related to "event" (at least in the name) here : https://www.ecma-international.org/ecma-262/#sec-event-set – Pac0 Sep 10 '19 at 09:37