TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

A crash course in how DOM events work

126 pointsby JeffJenkinsover 14 years ago

2 comments

warfangleover 14 years ago
While this is intended to be a crash course, I do want to note that event listeners don't quite get called like that. The event bubbling and capturing is quite accurate, but there are some specific differences in how listeners on any given element's event are called when compared to simply looping through and executing them:<p>The order in which they are called is not determinate. All of them will be called, but you cannot rely on the order in which they are called. Throwing an exception will also not prevent other event listeners from executing.<p>See: <a href="http://ajaxian.com/archives/the-differences-between-callbacks-and-events" rel="nofollow">http://ajaxian.com/archives/the-differences-between-callback...</a>
rriepeover 14 years ago
I feel like, now that the magic trick has been explained, my world is slightly less full of wonder and excitement.<p>Thanks, I think.
评论 #1794482 未加载
评论 #1794810 未加载