How does event handling work internally within JavaScript?
问题 Specifically Spidermonkey. I know you write functions and attach them to events to handle them. Where is the onClick handler defined and how does the JS engine know to fire onClick events when the user clicks? Any keywords, design patterns, links, etc are appreciated. UPDATE Aggregating links I find useful here: http://www.w3.org/TR/DOM-Level-2-Events/events.html https://github.com/joyent/node/blob/master/src/node_events.cc http://mxr.mozilla.org/mozilla/source/dom/src/events