Understanding Dean Edwards' addevent JavaScript

旧时模样 提交于 2019-12-01 09:21:18
Paul Sweatte

The guid is used to give each event a unique index, while the hash table is used to implement a dynamic dispatch table. this.$$handleEvent refers to the element in the handler mapping table.

A callback system works by storing event handlers in an array. When the underlying event is detected the dispatch system loops through the array calling the callback functions in turn.

The jQuery Event object uses a similar structure.

References

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!