fbjs
Version:
A collection of utility libraries used by other Facebook JS projects
41 lines (36 loc) • 1.06 kB
JavaScript
/**
* Copyright (c) 2013-present, Facebook, Inc.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
*/
var getVendorPrefixedName = require("./getVendorPrefixedName");
var BrowserSupportCore = {
/**
* @return {bool} True if browser supports css animations.
*/
hasCSSAnimations: function hasCSSAnimations() {
return !!getVendorPrefixedName('animationName');
},
/**
* @return {bool} True if browser supports css transforms.
*/
hasCSSTransforms: function hasCSSTransforms() {
return !!getVendorPrefixedName('transform');
},
/**
* @return {bool} True if browser supports css 3d transforms.
*/
hasCSS3DTransforms: function hasCSS3DTransforms() {
return !!getVendorPrefixedName('perspective');
},
/**
* @return {bool} True if browser supports css transitions.
*/
hasCSSTransitions: function hasCSSTransitions() {
return !!getVendorPrefixedName('transition');
}
};
module.exports = BrowserSupportCore;
;