Skip to content

Commit

Permalink
#2301 support browser that don't implement Promise.withResolvers()
Browse files Browse the repository at this point in the history
  • Loading branch information
stephanrauh committed Apr 19, 2024
1 parent 14d3c8d commit b003d6d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,5 +24,8 @@ new (function () {
return optionalChaining?.support;
}
}
window.supportsOptionalChaining = new BrowserCompatibilityTester().supportsOptionalChaining();

const supportsOptionalChaining = new BrowserCompatibilityTester().supportsOptionalChaining();
const supportModernPromises = !!Promise.withResolvers;
window.ngxExtendedPdfViewerCanRunModernJSCode = supportsOptionalChaining && supportModernPromises;
})();
Original file line number Diff line number Diff line change
Expand Up @@ -24,5 +24,8 @@ new (function () {
return optionalChaining?.support;
}
}
window.supportsOptionalChaining = new BrowserCompatibilityTester().supportsOptionalChaining();

const supportsOptionalChaining = new BrowserCompatibilityTester().supportsOptionalChaining();
const supportModernPromises = !!Promise.withResolvers;
window.ngxExtendedPdfViewerCanRunModernJSCode = supportsOptionalChaining && supportModernPromises;
})();

0 comments on commit b003d6d

Please sign in to comment.