Permalink
Browse files

documented the weak webgl test. version bump to 1.7 final.

  • Loading branch information...
1 parent 377a862 commit 5fd67ebc49c22be7651e9f422f591fe38417187e @paulirish paulirish committed Feb 21, 2011
Showing with 8 additions and 5 deletions.
  1. +8 −5 modernizr.js
View
@@ -1,12 +1,12 @@
/*!
- * Modernizr v1.7pre
+ * Modernizr v1.7
* http://www.modernizr.com
*
* Developed by:
* - Faruk Ates http://farukat.es/
* - Paul Irish http://paulirish.com/
*
- * Copyright (c) 2009-2010
+ * Copyright (c) 2009-2011
* Dual-licensed under the BSD or MIT licenses.
* http://www.modernizr.com/license/
*/
@@ -26,13 +26,13 @@
*
* @author Faruk Ates
* @author Paul Irish
- * @copyright (c) 2009-2010 Faruk Ates.
+ * @copyright (c) 2009-2011 Faruk Ates.
* @contributor Ben Alman
*/
window.Modernizr = (function(window,document,undefined){
- var version = '1.7pre',
+ var version = '1.7',
ret = {},
@@ -296,7 +296,10 @@ window.Modernizr = (function(window,document,undefined){
return !!(ret['canvas'] && is(document.createElement( 'canvas' ).getContext('2d').fillText, 'function'));
};
-
+ // This WebGL test false positives in FF depending on graphics hardware. But really it's quite impossible to know
+ // wether webgl will succeed until after you create the context. You might have hardware that can support
+ // a 100x100 webgl canvas, but will not support a 1000x1000 webgl canvas. So this feature inference is weak,
+ // but intentionally so.
tests['webgl'] = function(){
return !!window.WebGLRenderingContext;
};

0 comments on commit 5fd67eb

Please sign in to comment.