mirror of
https://github.com/encounter/phantomjs.git
synced 2026-03-30 11:35:11 -07:00
e8380e42d7
Added CoffeeScript examples where missing, minor other fixes such as spacing standardization (2 spaces is the standard in CoffeeScript via Ruby). Also a small set of minor JS example fixes and additional comments. Fixes http://code.google.com/p/phantomjs/issues/detail?id=907
23 lines
655 B
CoffeeScript
23 lines
655 B
CoffeeScript
feature = undefined
|
|
supported = []
|
|
unsupported = []
|
|
phantom.injectJs "modernizr.js"
|
|
console.log "Detected features (using Modernizr " + Modernizr._version + "):"
|
|
for feature of Modernizr
|
|
if Modernizr.hasOwnProperty(feature)
|
|
if feature[0] isnt "_" and typeof Modernizr[feature] isnt "function" and feature isnt "input" and feature isnt "inputtypes"
|
|
if Modernizr[feature]
|
|
supported.push feature
|
|
else
|
|
unsupported.push feature
|
|
console.log ""
|
|
console.log "Supported:"
|
|
supported.forEach (e) ->
|
|
console.log " " + e
|
|
|
|
console.log ""
|
|
console.log "Not supported:"
|
|
unsupported.forEach (e) ->
|
|
console.log " " + e
|
|
|
|
phantom.exit() |