summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRasmus Andersson <rasmus@notion.se>2023-11-20 19:22:35 +0300
committerRasmus Andersson <rasmus@notion.se>2023-11-20 19:22:35 +0300
commit8cadd9abd533f97bc19a1e9632ddd5ace92d9d61 (patch)
treef961709a341c7a147cc0a0f21ba6db31ac670b72
parent346a08d307fc743424b1748980c2fbe3a1d8a952 (diff)
downloadinter-8cadd9abd533f97bc19a1e9632ddd5ace92d9d61.tar.xz
website: make locale-sensitive number formatting work in web browsers without requestIdleCallback
-rw-r--r--docs/index.html2
1 files changed, 1 insertions, 1 deletions
diff --git a/docs/index.html b/docs/index.html
index 4e310bd1a..5a78782e9 100644
--- a/docs/index.html
+++ b/docs/index.html
@@ -1386,7 +1386,7 @@ let observer = new IntersectionObserver(callback, { rootMargin: "0px", threshold
observer.observe($('h1'))
// low priority stuff that doesn't need to happen immediately
-requestIdleCallback(() => {
+;(typeof requestIdleCallback == "undefined" ? f => f() : requestIdleCallback)(() => {
// convert .num/num numbers to local format, e.g. "1,234.56" vs "1.234,56"
let nfmt = new Intl.NumberFormat() // test with .NumberFormat('de-DE')
if (nfmt.format(1234.89) != "1,234.89") { // written as "1,234.89" in source