Path: blob/master/6-Selenium/phantomjs/examples/features.js
164 views
var feature, supported = [], unsupported = [];12phantom.injectJs('modernizr.js');3console.log('Detected features (using Modernizr ' + Modernizr._version + '):');4for (feature in Modernizr) {5if (Modernizr.hasOwnProperty(feature)) {6if (feature[0] !== '_' && typeof Modernizr[feature] !== 'function' &&7feature !== 'input' && feature !== 'inputtypes') {8if (Modernizr[feature]) {9supported.push(feature);10} else {11unsupported.push(feature);12}13}14}15}1617console.log('');18console.log('Supported:');19supported.forEach(function (e) {20console.log(' ' + e);21});2223console.log('');24console.log('Not supported:');25unsupported.forEach(function (e) {26console.log(' ' + e);27});28phantom.exit();29303132