aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2013-11-17 21:02:45 -0800
committerAlon Zakai <alonzakai@gmail.com>2013-11-17 21:02:45 -0800
commit047280d98decd0c4071b0a044461569b84193023 (patch)
tree65d657b3be14de07fe12154a0b920fe779d3c188
parent1bbd1b77a924919d632d1efd2f661636f6bd451c (diff)
try 'webgl' as well for webgl context creation; fixes #1813
-rw-r--r--src/library_browser.js4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/library_browser.js b/src/library_browser.js
index 1883c3be..8444fb73 100644
--- a/src/library_browser.js
+++ b/src/library_browser.js
@@ -250,7 +250,9 @@ mergeInto(LibraryManager.library, {
contextAttributes.preserveDrawingBuffer = true;
#endif
- ctx = canvas.getContext('experimental-webgl', contextAttributes);
+ ['experimental-webgl', 'webgl'].some(function(webglId) {
+ return ctx = canvas.getContext(webglId, contextAttributes);
+ });
} else {
ctx = canvas.getContext('2d');
}