The differences between capturing and bubbling

 

HTML DOM addEventListener() Method

 

the same question: bubbling and capturing

 

Syntax

element.addEventListener(eventfunctionuseCapture)
 
  useCapture:
    •   true - The event handler is executed in the capturing phase
    •   false- Default. The event handler is executed in the bubbling phase

 

Test Demo:

  https://jsfiddle.net/kkcodin/L3qo8ocp/

 

posted @ 2016-05-12 14:41  kkco  阅读(161)  评论(0编辑  收藏  举报