aboutsummaryrefslogtreecommitdiffstats
path: root/src/ng/sniffer.js
diff options
context:
space:
mode:
authorMatias Niemelä2013-05-07 10:29:29 -0400
committerMisko Hevery2013-05-08 15:40:37 -0700
commit88c3480aff79e1ff5b1ed8bd7f1e05df8ea1e068 (patch)
tree1eb4e66c454fdb802d080096209c111e8d22b733 /src/ng/sniffer.js
parent0cb04e2e9171ca60d4779cb9e0b4fe73f0926ace (diff)
downloadangular.js-88c3480aff79e1ff5b1ed8bd7f1e05df8ea1e068.tar.bz2
feat($sniffer): Add support for supportsAnimations flag for detecting CSS Animations browser support
Diffstat (limited to 'src/ng/sniffer.js')
-rw-r--r--src/ng/sniffer.js8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/ng/sniffer.js b/src/ng/sniffer.js
index 8a2fd44f..86c8dd00 100644
--- a/src/ng/sniffer.js
+++ b/src/ng/sniffer.js
@@ -9,7 +9,8 @@
*
* @property {boolean} history Does the browser support html5 history api ?
* @property {boolean} hashchange Does the browser support hashchange event ?
- * @property {boolean} supportsTransitions Does the browser support CSS transition events ?
+ * @property {boolean} transitions Does the browser support CSS transition events ?
+ * @property {boolean} animations Does the browser support CSS animation events ?
*
* @description
* This is very simple implementation of testing browser's features.
@@ -23,6 +24,7 @@ function $SnifferProvider() {
vendorRegex = /^(Moz|webkit|O|ms)(?=[A-Z])/,
bodyStyle = document.body && document.body.style,
transitions = false,
+ animations = false,
match;
if (bodyStyle) {
@@ -34,6 +36,7 @@ function $SnifferProvider() {
}
}
transitions = !!(('transition' in bodyStyle) || (vendorPrefix + 'Transition' in bodyStyle));
+ animations = !!(('animation' in bodyStyle) || (vendorPrefix + 'Animation' in bodyStyle));
}
@@ -61,7 +64,8 @@ function $SnifferProvider() {
},
csp: document.securityPolicy ? document.securityPolicy.isActive : false,
vendorPrefix: vendorPrefix,
- supportsTransitions : transitions
+ transitions : transitions,
+ animations : animations
};
}];
}