code: function discardEditQueue() {
                      while (editQueue.prev !== editQueue) {
                          var editLast = editQueue.prev;
  
                          if (editLast.error) {
                              editLast.error(new _ErrorFromName(EditError.canceled));
                          }
  
                          // Edits that haven't been applied to the slots yet don't need to be undone
                          if (editLast.undo && !refreshRequested) {
                              editLast.undo();
                          }
  
                          editQueue.prev = editLast.prev;
                      }
                      editQueue.next = editQueue;
  
                      editsInProgress = false;
  
                      completeEdits();
                  }
docs: Undo all queued edits, starting with the most recent