How to use the @loki/core.FetchingURLsError function in @loki/core

To help you get started, we’ve selected a few @loki/core examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github oblador / loki / packages / target-chrome-core / src / create-chrome-target.js View on Github external
const maybeFulfillPromise = () => {
          if (pageLoaded && Object.keys(pendingRequestURLMap).length === 0) {
            if (failedURLs.length !== 0) {
              reject(new FetchingURLsError(failedURLs));
            } else {
              // In some cases such as fonts further requests will only happen after the page has been fully rendered
              if (stabilizationTimer) {
                clearTimeout(stabilizationTimer);
              }
              stabilizationTimer = setTimeout(
                resolve,
                REQUEST_STABILIZATION_TIMEOUT
              );
            }
          }
        };