Why to disable bubbling, it is necessary to indicate this in the event object itself, and for capturing in event handler?

    1 answer 1

    Once upon a time there was a “browser war”, and views on events in javascript between NetScape and Microsoft differed. NetScape used a capture model, and MS surfacing. Accordingly, there were different methods for managing events. When standardization of this entire W3C began in the browser, two kinds of events were to be supported: first capture and then ascent. Accordingly, the methods for managing the first and managing the second have not changed and remain the same for backward compatibility. From here we have two different ways of working, but as far as I remember, interception of capture events is not currently used and only interception is used at the ascent stage.

    • I wonder for what reason did bubbling become the de facto standard? - voipp
    • Micrisoft, as always, distinguished itself, IE and up to version 9 supported only ascent. While I was looking for a version before which there was no support for capturing, I stumbled upon: IE's innovations and a phrase from there: Internet Explorer to version 9 only supported the emergence of events. Although the official specification of Events DOM decided to include both event capture and event popup, most web developers use popup exclusively, while event capture was left for some workarounds and techniques hidden deep inside the javascript libraries. - Alex Krass