How to implement a complete event system with Javascript?

前端 未结 3 1932
走了就别回头了
走了就别回头了 2021-01-27 17:43

I\'m creating a client-side dynamic blog engine. Now I need a event system to handle many actions from DOM elements and the engine. Such as the engine is loading a article,user

3条回答
  •  独厮守ぢ
    2021-01-27 17:49

    You could implement mediator pattern:

    http://addyosmani.com/resources/essentialjsdesignpatterns/book/#mediatorpatternjavascript

    In this book is everything you need to know about it.

提交回复
热议问题