From ad990b3e525bf9a0ed2b87b0887249097b2d4abf Mon Sep 17 00:00:00 2001 From: Joshua Horton Date: Mon, 18 Aug 2025 09:12:02 -0500 Subject: [PATCH 1/3] fix(android): polyfill globalThis for API 28 devices Fixes: #14450 --- android/KMEA/app/src/main/assets/other-polyfills.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/android/KMEA/app/src/main/assets/other-polyfills.js b/android/KMEA/app/src/main/assets/other-polyfills.js index 2102a07134..b90767039c 100644 --- a/android/KMEA/app/src/main/assets/other-polyfills.js +++ b/android/KMEA/app/src/main/assets/other-polyfills.js @@ -14,4 +14,7 @@ if(!Array.prototype.includes){ Array.prototype.includes = function(search){ return !!~this.indexOf(search); } -} \ No newline at end of file +} + +// This file is only referenced by the main Web engine; its "global" object is `window`. +var globalThis = window; \ No newline at end of file From 0e46c2d2f7ee505bbe06c97026bf73393717c446 Mon Sep 17 00:00:00 2001 From: Joshua Horton Date: Mon, 18 Aug 2025 09:15:04 -0500 Subject: [PATCH 2/3] docs(android): add min Chrome version in polyfill doc --- android/KMEA/app/src/main/assets/other-polyfills.js | 1 + 1 file changed, 1 insertion(+) diff --git a/android/KMEA/app/src/main/assets/other-polyfills.js b/android/KMEA/app/src/main/assets/other-polyfills.js index b90767039c..d91943eda0 100644 --- a/android/KMEA/app/src/main/assets/other-polyfills.js +++ b/android/KMEA/app/src/main/assets/other-polyfills.js @@ -17,4 +17,5 @@ if(!Array.prototype.includes){ } // This file is only referenced by the main Web engine; its "global" object is `window`. +// `globalThis` is defined in Chrome 71+. var globalThis = window; \ No newline at end of file From a54e5a027a2b96399348e5d55a86b01b6064fc80 Mon Sep 17 00:00:00 2001 From: Joshua Horton Date: Tue, 19 Aug 2025 08:08:07 -0500 Subject: [PATCH 3/3] change(android): check globalThis before polyfill --- android/KMEA/app/src/main/assets/other-polyfills.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/android/KMEA/app/src/main/assets/other-polyfills.js b/android/KMEA/app/src/main/assets/other-polyfills.js index d91943eda0..f86e51f8f4 100644 --- a/android/KMEA/app/src/main/assets/other-polyfills.js +++ b/android/KMEA/app/src/main/assets/other-polyfills.js @@ -18,4 +18,6 @@ if(!Array.prototype.includes){ // This file is only referenced by the main Web engine; its "global" object is `window`. // `globalThis` is defined in Chrome 71+. -var globalThis = window; \ No newline at end of file +if(typeof globalThis == 'undefined') { + var globalThis = window; +} \ No newline at end of file