Event handler bind to an anonymous function vs named function

杀马特。学长 韩版系。学妹 提交于 2019-12-04 01:59:41

There won't be any noticeable performance difference.

One main difference is that with a named function you can also selectively unbind functions and not just all functions associated with an event type.

Of course, this can also help you avoid code duplication.

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