Загрузка...

EVENT PROPAGATION IN JS #latest #javascript #coding #learnwebdev #shorts #react #reactjs #next

What is EVENT PROPAGATION ? EVENT PROPAGATION explained the easiest way... EVENT PROPAGATION IN JS ... EVENT PROPAGATION IN REACT.. EVENT PROPAGATION IN NEXTJS
#javascript #programming #coding #video #webdevelopment #web #codinglife #java #javascriptengineer #website #html #css #venkyscode #shorts #ajax #javascriptinterview #frontend #fullstack #vanillajs #vanillajavascript

What is “propagation”?

Propagation refers to how events travel through the Document Object Model (DOM) tree. The DOM tree is the structure which contains parent/child/sibling elements in relation to each other. You can think of propagation as electricity running through a wire, until it reaches its destination. The event needs to pass through every node on the DOM until it reaches the end, or if it is forcibly stopped.

Event.stopPropagation()

These two methods are used for solving the previously mentioned problem regarding event propagation. Calling Event.stopPropagation() will prevent further propagation through the DOM tree, and only run the event handler from which it was called.
onclick function of a parent div also gets Invoked
Parent div function gets Invoked when clicked on child
Onclick function of a parent button also gets triggered / Invoked
Parent button function get triggered / Invoked

Видео EVENT PROPAGATION IN JS #latest #javascript #coding #learnwebdev #shorts #react #reactjs #next канала VenkysCode
Яндекс.Метрика
Все заметки Новая заметка Страницу в заметки
Страницу в закладки Мои закладки
На информационно-развлекательном портале SALDA.WS применяются cookie-файлы. Нажимая кнопку Принять, вы подтверждаете свое согласие на их использование.
О CookiesНапомнить позжеПринять