Skip to content

Commit

Permalink
Moving webgl test to feature-detects/webgl.js
Browse files Browse the repository at this point in the history
  • Loading branch information
rupl committed Sep 20, 2012
1 parent 25fec3c commit 9776162
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 9 deletions.
8 changes: 8 additions & 0 deletions feature-detects/webgl.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@

// WebGL
// webk.it/70117 is tracking a legit WebGL feature detect proposal

// We do a soft detect which may false positive in order to avoid
// an expensive context creation: bugzil.la/732441

Modernizr.addTests('webgl', (Modernizr.webgl = !!window.WebGLRenderingContext));
9 changes: 0 additions & 9 deletions modernizr.js
Original file line number Diff line number Diff line change
Expand Up @@ -400,15 +400,6 @@ window.Modernizr = (function( window, document, undefined ) {
* -----
*/

// webk.it/70117 is tracking a legit WebGL feature detect proposal

// We do a soft detect which may false positive in order to avoid
// an expensive context creation: bugzil.la/732441

tests['webgl'] = function() {
return !!window.WebGLRenderingContext;
};

/*
* The Modernizr.touch test only indicates if the browser supports
* touch events, which does not necessarily reflect a touchscreen
Expand Down

0 comments on commit 9776162

Please sign in to comment.