abnDK / personal-budget-2

For completing personal budget 2 project in Codecademy back engineer career path
0 stars 0 forks source link

Use global event listeners for budget "add row" button #47

Open abnDK opened 1 year ago

abnDK commented 1 year ago

See video on Events etc https://www.youtube.com/watch?v=XF1_MlZ5l6M&ab_channel=WebDevSimplified

He talks about making a function "SetGlobalEventlistener" on document, that check for event.target's selector and fires if matches.

Altso: Is there anywhere in the application we can take advantage of (event)bubbling (from child to root/document) or capture (from root/document to child)??

Another thing: Multiple eventlisteners can be placed on the same element. They are fired in the order they are defined. How can this be used for firing a specific flow of logic?