Welcome to Software Development on Codidact!
Will you help us build our independent community of developers helping developers? We're small and trying to grow. We welcome questions about all aspects of software development, from design to code to QA and more. Got questions? Got answers? Got code you'd like someone to review? Please join us.
Comments on What is the main difference between event delegation to other event handling patterns in JavaScript?
Post
What is the main difference between event delegation to other event handling patterns in JavaScript?
I define a software event as any state of a program to which we can probably respond.
In JavaScript, how does event delegation differs from more simple and probably more common event handling patterns such as:
window.addEventListener('DOMContentLoaded', () => {} );
window.addEventListener('load', () => {} );
The terminology of event delegation is significantly more complex than of these and I hope to get an answer from which it will be clear to me what is the main reason that makes it more complex so to need terms such as delegation/propagation/bubbling, etc.
1 comment thread