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.

Post History

36%
+2 −5
Q&A 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 patt...

1 answer  ·  posted 2y ago by deleted user  ·  edited 2y ago by Alexei‭

#9: Post edited by user avatar Alexei‭ · 2021-09-30T04:42:36Z (over 2 years ago)
added relevant tag
#8: Post edited by (deleted user) · 2021-09-29T01:55:54Z (over 2 years ago)
In my mind, the passing of even 1 millisecond is a possible defined event but okay, if it's not formal in the JavaScript documentation as an event, I remove this from here.
  • 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', () => {} );`
  • * `window.setTimeout( () => {}, MILLISECONDS);`
  • * `window.setInterval( () => {}, MILLISECONDS;`
  • 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.
  • 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.
#7: Post edited by (deleted user) · 2021-09-29T01:53:11Z (over 2 years ago)
  • I define a software event as any state of a program (possibly excluding starting the program), to which we can probably respond.
  • In JavaScript, how does _event delegation_, as an event handling pattern, differs from more simple and probably more common event handling patterns such as:
  • * `window.addEventListener('DOMContentLoaded', () => {} );`
  • * `window.addEventListener('load', () => {} );`
  • * `window.setTimeout( () => {}, MILLISECONDS);`
  • * `window.setInterval( () => {}, MILLISECONDS;`
  • 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/target/propagation/bubbling, etc.
  • 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', () => {} );`
  • * `window.setTimeout( () => {}, MILLISECONDS);`
  • * `window.setInterval( () => {}, MILLISECONDS;`
  • 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.
#6: Post edited by (deleted user) · 2021-09-29T01:34:27Z (over 2 years ago)
  • In JavaScript, how does _event delegation_, as an event handling pattern, differs from more simple and probably more common event handling patterns such as:
  • * `window.addEventListener('DOMContentLoaded', () => {} );`
  • * `window.addEventListener('load', () => {} );`
  • * `window.setTimeout( () => {}, MILLISECONDS);`
  • * `window.setInterval( () => {}, MILLISECONDS;`
  • 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/target/propagation/bubbling, etc.
  • I define a software event as any state of a program (possibly excluding starting the program), to which we can probably respond.
  • In JavaScript, how does _event delegation_, as an event handling pattern, differs from more simple and probably more common event handling patterns such as:
  • * `window.addEventListener('DOMContentLoaded', () => {} );`
  • * `window.addEventListener('load', () => {} );`
  • * `window.setTimeout( () => {}, MILLISECONDS);`
  • * `window.setInterval( () => {}, MILLISECONDS;`
  • 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/target/propagation/bubbling, etc.
#5: Post edited by (deleted user) · 2021-09-28T14:37:49Z (over 2 years ago)
  • In JavaScript, how does _event delegation_, as an event handling pattern, differs from more simple and probably more common event handling patterns such as:
  • * `window.addEventListener('DOMContentLoaded', () => {} );`
  • * `window.addEventListener('load', () => {} );`
  • * `window.setTimeout( () => {}, MILLISECONDS);`
  • * `window.setInterval( () => {}, MILLISECONDS;`
  • The terminology (and maybe also the syntax) 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.
  • In JavaScript, how does _event delegation_, as an event handling pattern, differs from more simple and probably more common event handling patterns such as:
  • * `window.addEventListener('DOMContentLoaded', () => {} );`
  • * `window.addEventListener('load', () => {} );`
  • * `window.setTimeout( () => {}, MILLISECONDS);`
  • * `window.setInterval( () => {}, MILLISECONDS;`
  • 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/target/propagation/bubbling, etc.
#4: Post edited by (deleted user) · 2021-09-28T09:15:05Z (over 2 years ago)
  • In JavaScript, how does _event delegation_, as an event handling pattern, differs from more simple and probably more common event handling patterns such as:
  • * `window.addEventListener('DOMContentLoaded', () => {} );`
  • * `window.addEventListener('load', () => {} );`
  • * `window.setTimeout( () => {}, MILLISECONDS);`
  • * `window.setInterval( () => {}, MILLISECONDS;`
  • The terminology (and maybe also the syntax) 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 much more complex so to need terms such as delegation/propagation/bubbling, etc.
  • In JavaScript, how does _event delegation_, as an event handling pattern, differs from more simple and probably more common event handling patterns such as:
  • * `window.addEventListener('DOMContentLoaded', () => {} );`
  • * `window.addEventListener('load', () => {} );`
  • * `window.setTimeout( () => {}, MILLISECONDS);`
  • * `window.setInterval( () => {}, MILLISECONDS;`
  • The terminology (and maybe also the syntax) 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.
#3: Post edited by (deleted user) · 2021-09-28T07:10:45Z (over 2 years ago)
  • What is the main difference between event delegation to other event handling approaches in JavaScript?
  • What is the main difference between event delegation to other event handling patterns in JavaScript?
#2: Post edited by (deleted user) · 2021-09-28T07:10:16Z (over 2 years ago)
  • What is the main difference between event delegation to other event handling methods in JavaScript?
  • What is the main difference between event delegation to other event handling approaches in JavaScript?
#1: Initial revision by (deleted user) · 2021-09-28T07:09:55Z (over 2 years ago)
What is the main difference between event delegation to other event handling methods in JavaScript?
In JavaScript, how does _event delegation_, as an event handling pattern, differs from more simple and probably more common event handling patterns such as:

* `window.addEventListener('DOMContentLoaded', () => {} );`
* `window.addEventListener('load', () => {} );`
* `window.setTimeout( () => {}, MILLISECONDS);`
* `window.setInterval( () => {}, MILLISECONDS;`

The terminology (and maybe also the syntax) 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 much more complex so to need terms such as delegation/propagation/bubbling, etc.