如何在YUI3的插件上注册事件处理程序

问题描述:

给定下面的代码,是否有更好的方式在resize插件上注册事件处理程序?谢谢!如何在YUI3的插件上注册事件处理程序

 var target = Y.Node.create('<div class="rich-text-container"></div>'); 

     // ... 

     target.plug(Y.Plugin.Resize,{ 
      wrap : true 
     }); 

     target[Y.Plugin.Resize.NS].on('resize:end',function (e) { 
      debugger; 
      // This runs, but is there a better way? 
     }); 

target.resize.on('resize:end',function (e) { 
     alert('this is correct'); 
    }); 

Y.Plugin.Resize.NS指向字符串“调整”,并表示进行插件主机插件实例将被保存。 DERP。