Communities

Writing
Writing
Codidact Meta
Codidact Meta
The Great Outdoors
The Great Outdoors
Photography & Video
Photography & Video
Scientific Speculation
Scientific Speculation
Cooking
Cooking
Electrical Engineering
Electrical Engineering
Judaism
Judaism
Languages & Linguistics
Languages & Linguistics
Software Development
Software Development
Mathematics
Mathematics
Christianity
Christianity
Code Golf
Code Golf
Music
Music
Physics
Physics
Linux Systems
Linux Systems
Power Users
Power Users
Tabletop RPGs
Tabletop RPGs
Community Proposals
Community Proposals
tag:snake search within a tag
answers:0 unanswered questions
user:xxxx search by author id
score:0.5 posts with 0.5+ score
"snake oil" exact phrase
votes:4 posts with 4+ votes
created:<1w created < 1 week ago
post_type:xxxx type of post
Search help
Notifications
Mark all as read See all your notifications »
Q&A

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?

+2
−5

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.

History
Why does this post require attention from curators or moderators?
You might want to add some details to your flag.
Why should this post be closed?

1 comment thread

I guess here we have a similar issue that happened in your [other question](/posts/284415): you downv... (1 comment)
I guess here we have a similar issue that happened in your [other question](/posts/284415): you downv...

Skipping 9 deleted comments.

Alexei‭ wrote about 3 years ago

I have removed the comments in this thread. Please do not use the comments on a certain question to discuss issues about other posts.