summaryrefslogtreecommitdiffstats
path: root/vnfmarket/src/main/webapp/vnfmarket/node_modules/phantomjs/lib/phantom/examples/features.js
blob: a60643c8c865b2bb4dd62c6aa835790b44c8497c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
var feature, supported = [], unsupported = [];

phantom.injectJs('modernizr.js');
console.log('Detected features (using Modernizr ' + Modernizr._version + '):');
for (feature in Modernizr) {
    if (Modernizr.hasOwnProperty(feature)) {
        if (feature[0] !== '_' && typeof Modernizr[feature] !== 'function' &&
            feature !== 'input' && feature !== 'inputtypes') {
            if (Modernizr[feature]) {
                supported.push(feature);
            } else {
                unsupported.push(feature);
            }
        }
    }
}

console.log('');
console.log('Supported:');
supported.forEach(function (e) {
    console.log('  ' + e);
});

console.log('');
console.log('Not supported:');
unsupported.forEach(function (e) {
    console.log('  ' + e);
});
phantom.exit();