Event bubbling/capturing - where does it start/end?
I understand that an event has two modes -- bubbling and capturing. When an event is set to bubble, does Javascript checks up to "document" ? When an event is set to capture, does Javascript always starts from "document"? How does Javascript know where to stop/start ? Update: Let's say I have the following code in my body tag. <div id='outer'> <div id='inner'></div> </div> When I set an event to #inner to bubble, does Javascript check up to document or does it stop at #outer? Event bubbling JavaScript checks all the way up to document. If you add a listener on document and a listener on inner,