首页 新闻 会员 周边

求分析多层闭包(JS)

0
悬赏园豆:10 [已关闭问题] 关闭于 2015-08-05 09:26

spine中有这么个函数:

Module.proxy = function(func) {
  return (function(_this) {
    return function() {
      return func.apply(_this, arguments);
    };
  })(this);
};

官方api中解释是

A JavaScript compatibility function, which ensures that the function is
always called in the context of the Controller's instance.

然而并没有看懂,求详细讲解,最好有例子说明一下,谢谢

脑残宝的主页 脑残宝 | 初学一级 | 园豆:165
提问于:2015-07-19 10:40
< >
分享
所有回答(1)
0

只是传一个方法的指针嘛,这上面很多人会回答的,http://foundexception.com/

刘珍宝 | 园豆:289 (菜鸟二级) | 2015-07-19 12:54
清除回答草稿
   您需要登录以后才能回答,未注册用户请先注册