Skip to content

Commit

Permalink
adding opera to webgl check (in development) as well as IE (who knows..)
Browse files Browse the repository at this point in the history
  • Loading branch information
paulirish committed Feb 11, 2010
1 parent a55b5a2 commit 309764b
Showing 1 changed file with 12 additions and 11 deletions.
23 changes: 12 additions & 11 deletions modernizr.js
Original file line number Diff line number Diff line change
Expand Up @@ -245,17 +245,18 @@ window.Modernizr = (function(window,doc,undefined){
};


tests[webgl] = function(){
var elem = doc.createElement( canvas ),
contexts = [webgl, "experimental-"+webgl, "moz-"+webgl, "o-"+webgl, "webkit-3d", "3d"]; // this could probably use expansion.

for (var b = -1, len = contexts.length; ++b < len; ) {
try {
if (elem.getContext(contexts[b])) return true;
} catch(e){ }
}
return false;
};
tests[webgl] = function(){

var elem = doc.createElement( canvas ),
contexts = [webgl, "ms-"+webgl, "experimental-"+webgl, "moz-"+webgl, "opera-3d", "webkit-3d", "ms-3d", "3d"];

for (var b = -1, len = contexts.length; ++b < len; ) {
try {
if (elem.getContext(contexts[b])) return true;
} catch(e){ }
}
return false;
};


/**
Expand Down

0 comments on commit 309764b

Please sign in to comment.