前端事件式编程

<script src="eventproxy.js"></script>
    <script>
        // EventProxy此时是一个全局变量
        var ep = new EventProxy();
        setTimeout(function() {
            ep.emit('tpl');
        }, 3000);

        ep.all('tpl', function(tpl) {    
            console.log(tpl);
        });
    </script>

 

 

官网: http://eventproxy.html5ify.com/

 

相关文章:

  • 2021-12-03
  • 2022-12-23
  • 2022-12-23
  • 2021-04-13
  • 2021-12-03
  • 2021-09-06
猜你喜欢
  • 2022-02-13
  • 2022-12-23
  • 2022-01-02
  • 2021-09-25
  • 2022-02-06
  • 2022-12-23
相关资源
相似解决方案