mirror of
https://github.com/rsms/inter.git
synced 2024-11-15 19:47:47 +01:00
website: make locale-sensitive number formatting work in web browsers without requestIdleCallback
This commit is contained in:
parent
346a08d307
commit
8cadd9abd5
1 changed files with 1 additions and 1 deletions
|
@ -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 a new issue