summaryrefslogtreecommitdiff
path: root/platform/web/detect.py
diff options
context:
space:
mode:
Diffstat (limited to 'platform/web/detect.py')
-rw-r--r--platform/web/detect.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/platform/web/detect.py b/platform/web/detect.py
index e055af8400..08f964db92 100644
--- a/platform/web/detect.py
+++ b/platform/web/detect.py
@@ -227,3 +227,7 @@ def configure(env):
# Add code that allow exiting runtime.
env.Append(LINKFLAGS=["-s", "EXIT_RUNTIME=1"])
+
+ # This workaround creates a closure that prevents the garbage collector from freeing the WebGL context.
+ # We also only use WebGL2, and changing context version is not widely supported anyway.
+ env.Append(LINKFLAGS=["-s", "GL_WORKAROUND_SAFARI_GETCONTEXT_BUG=0"])