Browse Source

Added getContext( 'webgl' ) check in Detector.
https://bugzilla.mozilla.org/show_bug.cgi?id=912606

Mr.doob 12 years ago
parent
commit
32cf8fc549
1 changed files with 1 additions and 1 deletions
  1. 1 1
      examples/js/Detector.js

+ 1 - 1
examples/js/Detector.js

@@ -6,7 +6,7 @@
 var Detector = {
 
 	canvas: !! window.CanvasRenderingContext2D,
-	webgl: ( function () { try { return !! window.WebGLRenderingContext && !! document.createElement( 'canvas' ).getContext( 'experimental-webgl' ); } catch( e ) { return false; } } )(),
+	webgl: ( function () { try { var canvas = document.createElement( 'canvas' ); return !! window.WebGLRenderingContext && !! canvas.getContext( 'webgl' ) && !! canvas.getContext( 'experimental-webgl' ); } catch( e ) { return false; } } )(),
 	workers: !! window.Worker,
 	fileapi: window.File && window.FileReader && window.FileList && window.Blob,