docs: function () {
              unloaded = true;
              // stop loading the page if it hasn't finished yet
              if ($loadSVGPromise && $loadSVGPromise.state() !== 'resolved') {
                  $loadSVGPromise.abort();
                  $loadSVGPromise = null;
              }
  
              // remove the svg element if necessary
              if (removeOnUnload) {
                  if ($svg) {
                      $svg.remove();
                      $svg = null;
                  }
                  svgLoaded = false;
              }
          }