function loadHtml2Canvas() {
    return function () {
      if (globalObject["html2canvas"]) {
        return Promise.resolve(globalObject["html2canvas"]);
      }

      return import('html2canvas');
    }().catch(function (e) {
      return Promise.reject(new Error("Could not load html2canvas: " + e));
    }).then(function (html2canvas) {
      return html2canvas.default ? html2canvas.default : html2canvas;
    });
  }
jsPDF html PlugIn

@name html
@module