| 1 | "use strict"; |
| 2 | var feature, supported = [], unsupported = []; |
| 3 | |
| 4 | phantom.injectJs('modernizr.js'); |
| 5 | console.log('Detected features (using Modernizr ' + Modernizr._version + '):'); |
| 6 | for (feature in Modernizr) { |
| 7 | if (Modernizr.hasOwnProperty(feature)) { |
| 8 | if (feature[0] !== '_' && typeof Modernizr[feature] !== 'function' && |
| 9 | feature !== 'input' && feature !== 'inputtypes') { |
| 10 | if (Modernizr[feature]) { |
| 11 | supported.push(feature); |
| 12 | } else { |
| 13 | unsupported.push(feature); |
| 14 | } |
| 15 | } |
| 16 | } |
| 17 | } |
| 18 | |
| 19 | console.log(''); |
| 20 | console.log('Supported:'); |
| 21 | supported.forEach(function (e) { |
| 22 | console.log(' ' + e); |
| 23 | }); |
| 24 | |
| 25 | console.log(''); |
| 26 | console.log('Not supported:'); |
| 27 | unsupported.forEach(function (e) { |
| 28 | console.log(' ' + e); |
| 29 | }); |
| 30 | phantom.exit(); |