How does the browser's event triggering thread work? For example, when we click on an element on the page, how do the objects in the DOM tree receive the event? How is the event object generated and initialized? Before generating an event object, it is necessary to determine whether the DOM object has an event handler registered, or whether the registered event handler is consistent with the event type? Could you please describe what happened at the bottom level from when the event was triggered to when it was added to the task queue...
There are two mechanisms for events, one is event bubbling (which we commonly use) and the other is event capturing
You can read the article linked below
http://www.cnblogs.com/bfgis/...