From 152c058ff53716a806f24a2d34e0d27256704fb5 Mon Sep 17 00:00:00 2001 From: Ansis Brammanis Date: Fri, 8 Aug 2014 16:33:48 -0700 Subject: [PATCH] check for webgl support by creating a context fix #677 --- js/util/browser/browser.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/js/util/browser/browser.js b/js/util/browser/browser.js index 19a0252e314..ca7f009b77e 100644 --- a/js/util/browser/browser.js +++ b/js/util/browser/browser.js @@ -88,7 +88,8 @@ exports.supported = function() { if ('supportsContext' in canvas) { return canvas.supportsContext('webgl') || canvas.supportsContext('experimental-webgl'); } - return !!window.WebGLRenderingContext; + return !!window.WebGLRenderingContext && + (!!canvas.getContext('webgl') || !!canvas.getContext('experimental-webgl')); }, function() { return 'Worker' in window; }