code: function cancel() {
          if (ended) {
              return;
          }
  
          ended = true;
  
          for (let i = ran; i < pending; i++) {
              const child = waitFor[i];
              child.removeEventListener(TRANSITION_END, listener);
          }
  
          if (cancelFrame) {
              cancelFrame();
              classList.remove(initClass);
          } else {
              classList.remove(className);
          }
      }
docs: Cancels the current transition and resets the className.