使用ACE Editor,如何取消绑定事件?

问题描述

| https://github.com/ajaxorg/ace/wiki/Embedding---API
editor.session.on(\'change\',callback);
将事件绑定到\“ change \”的方式。但是如何解除绑定呢?     

解决方法

        使用ѭ1删除特定的回调。
editor.session.removeListener(\'change\',callback);
或更短的版本
editor.session.off(\'change\',callback);
使用
removeAllListeners
删除所有回调。
editor.session.removeAllListeners(\'change\');