Skip to content

Commit

Permalink
make caniuse results play nice with our funky audio/video return types.
Browse files Browse the repository at this point in the history
  • Loading branch information
paulirish committed Oct 21, 2011
1 parent 2a4753d commit 1e82aef
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion test/js/unit-caniuse.js
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,10 @@ window.caniusecb = function(scriptdata) {
function testify(o){

var ciubool = bool(o.ciuresult);

// caniuse says audio/video are yes/no, Modernizr has more detail which we'll dumb down.
if (~TEST.audvid.indexOf(o.feature))
o.result = !!o.result;

// if caniuse gave us a 'partial', lets let it pass with a note.
if (o.ciuresult == 'a'){
Expand Down Expand Up @@ -120,7 +124,7 @@ window.caniusecb = function(scriptdata) {
var ciufeatdata = testdata[ciufeatname];

if (ciufeatdata === undefined) throw 'unknown key of caniusedata';

// get results for this feature for all versions of this browser
var browserResults = ciufeatdata.stats[currBrowser];

Expand Down

0 comments on commit 1e82aef

Please sign in to comment.