 {
              window.webkit.messageHandlers.clearAction.postMessage(JSON.stringify(historyArr) );
              window.webkit.messageHandlers.reDoHistoryChange.postMessage("true");
          }
    }

    function checkHasDone() {
          let historyArr = myCodeMirror.getHistory()
          if (!historyArr || JSON.stringify(historyArr) == "" || JSON.stringify(historyArr) == "{}" || !historyArr.undone || historyArr.undone.length <= 1) {
              window.webkit.messageHandlers.onDoHistoryChange.postMe