aboutsummaryrefslogtreecommitdiffstats
path: root/src/ng/sniffer.js
diff options
context:
space:
mode:
authorJulien Bouquillon2013-06-28 12:06:36 +0200
committerPete Bacon Darwin2013-07-03 22:16:31 +0100
commitef5bc6c7c3336a64bae64fe9739cb1789907c906 (patch)
tree49fcf49655ac100076e51a8f2dbf50b1f7e1c827 /src/ng/sniffer.js
parent22b9b4757610918456e3486deb514bcc60a08852 (diff)
downloadangular.js-ef5bc6c7c3336a64bae64fe9739cb1789907c906.tar.bz2
fix($sniffer): detect transition/animation on older Android browsers
The stock Android browser doesn't support the current for-in body/style detection for animations and transitions but we can manually fix this. This is useful for PhoneGap web-views or traditional web-apps using the stock browser.
Diffstat (limited to 'src/ng/sniffer.js')
-rw-r--r--src/ng/sniffer.js5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/ng/sniffer.js b/src/ng/sniffer.js
index 86c8dd00..54e6e083 100644
--- a/src/ng/sniffer.js
+++ b/src/ng/sniffer.js
@@ -37,6 +37,11 @@ function $SnifferProvider() {
}
transitions = !!(('transition' in bodyStyle) || (vendorPrefix + 'Transition' in bodyStyle));
animations = !!(('animation' in bodyStyle) || (vendorPrefix + 'Animation' in bodyStyle));
+
+ if (android && (!transitions||!animations)) {
+ transitions = isString(document.body.style.webkitTransition);
+ animations = isString(document.body.style.webkitAnimation);
+ }
}