async function toggle()

in addon/src/button.js [40:60]


  async function toggle() {
    enabled = !enabled;
    if (enabled) {
      button.appendChild(spinner);
      try {
        await applyOverlay(revPromise, path);
        button.style.backgroundColor = "lightgrey";
      } catch (ex) {
        button.style.backgroundColor = "red";
        disableButton(
          button,
          "Error retrieving coverage information for this file",
        );
      } finally {
        button.removeChild(spinner);
      }
    } else {
      removeOverlay();
      button.style.backgroundColor = "white";
    }
  }