草庐IT

onSomethingHappened

全部标签

javascript - 如何测试事件触发后是否调用了函数?

FooView中触发了自定义事件..//views/foo_view.jsthis.trigger("something:happened");关联的FooController绑定(bind)一个处理程序来处理事件...//controller/foo_controller.jsinitialize:function(){this.fooView=newFooView();this.fooView.bind("something:happened",this.onSomethingHappened,this);}onSomethingHappened:function(event){/