With the ACE Editor, how can I unbind an event?

前端 未结 1 709
忘了有多久
忘了有多久 2020-12-20 12:43

https://github.com/ajaxorg/ace/wiki/Embedding---API

editor.session.on(\'change\', callback);

is how you bind an event to \"change\". But ho

相关标签:
1条回答
  • 2020-12-20 13:19

    Use removeListener to remove a specific callback.

    editor.session.removeListener('change', callback);
    

    or a shorter version

    editor.session.off('change', callback);
    

    Use removeAllListeners to remove all callbacks.

    editor.session.removeAllListeners('change');
    
    0 讨论(0)
提交回复
热议问题