change", ()=>{
        checkHasUndone();
        checkHasDone();
    })
    
    function checkHasUndone() {
          let historyArr =  myCodeMirror.getHistory()
          if(!historyArr || JSON.stringify(historyArr) == "" ||  JSON.stringify(historyArr) == "{}" || !historyArr.done || historyArr.done.length<=1){
              window.webkit.messageHandlers.clearAction.postMessage(JSON.stringify(historyArr) );
              window.webkit.messageHandlers.reDoHistoryChange.postMessage("false");
          } else