mirror of
https://github.com/rsms/inter.git
synced 2024-10-05 14:47:20 +03:00
website: make locale-sensitive number formatting work in web browsers without requestIdleCallback
This commit is contained in:
parent
346a08d307
commit
8cadd9abd5
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user