Skip to content

Commit

Permalink
Merge pull request #147 from amesgen/globalThis
Browse files Browse the repository at this point in the history
Files: use `globalThis`
  • Loading branch information
hamishmack authored Oct 30, 2024
2 parents 5e55089 + b4ac2f9 commit d371de6
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions jsaddle/src/Language/Javascript/JSaddle/Run/Files.hs
Original file line number Diff line number Diff line change
Expand Up @@ -330,10 +330,10 @@ runBatch send sendSync = "\
\ inCallback--;\n\
\ };\n\
\ if(batch[1] && (initialSyncDepth || 0) === 0) {\n\
\ window.requestAnimationFrame(processBatch);\n\
\ globalThis.requestAnimationFrame(processBatch);\n\
\ }\n\
\ else {\n\
\ processBatch(window.performance ? window.performance.now() : null);\n\
\ processBatch(globalThis.performance ? globalThis.performance.now() : null);\n\
\ }\n\
\ };\n\
\ runBatch(batch);\n\
Expand Down Expand Up @@ -444,7 +444,7 @@ ghcjsHelpers = "\
\ };\n\
\}\n\
\function h$newByteArrayFromBase64String(base64) {\n\
\ var bin = window.atob(base64);\n\
\ var bin = globalThis.atob(base64);\n\
\ var ba = h$newByteArray(bin.length);\n\
\ var u8 = ba.u8;\n\
\ for (var i = 0; i < bin.length; i++) {\n\
Expand All @@ -459,6 +459,6 @@ ghcjsHelpers = "\
\ for (var i = off; i < end; i++) {\n\
\ bin += String.fromCharCode(u8[i]);\n\
\ }\n\
\ return window.btoa(bin);\n\
\ return globalThis.btoa(bin);\n\
\}\n\
\"

0 comments on commit d371de6

Please sign in to comment.