text: var WindowErrorHandler = /** @class */ (function () {
      function WindowErrorHandler() {
      }
      /**
       * Calls the window.onerror function. Use this method for errors that cannot be handled by the window.onerror standard handler.
       * Mostly, this method will be used to provide retroaction on Promise errors.
       * @param error The unhandled error.
       * @param defer True will delay the execution of the call to the next cyle, allowing, for example, stopping the propagation of the error in the promise chain. Default is false.
       */
      WindowErrorHandler.onError = function (error, defer) {
          if (defer === void 0) { defer = false; }
          var call = function () {
              if (!error.cancelBubble) {
                  window.dispatchEvent(error);
              }
          };
          defer ? setTimeout(function () { return call(); }, 0) : call();
      };
      return WindowErrorHandler;
  }());
  export { WindowErrorHandler };
  //# sourceMappingURL=window-error-handler.js.map