Files
stf-DeviceFarmer/res/app/components/stf/util/vendor/vendor-util.js
2016-01-19 23:08:33 +09:00

16 lines
354 B
JavaScript

module.exports = function VendorUtilFactory() {
var vendorUtil = {}
vendorUtil.style = function(props) {
var testee = document.createElement('span')
for (var i = 0, l = props.length; i < l; ++i) {
if (typeof testee.style[props[i]] !== 'undefined') {
return props[i]
}
}
return props[0]
}
return vendorUtil
}