diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/ng/animator.js | 2 | ||||
| -rw-r--r-- | src/ng/sniffer.js | 8 | ||||
| -rw-r--r-- | src/ngScenario/Application.js | 2 |
3 files changed, 8 insertions, 4 deletions
diff --git a/src/ng/animator.js b/src/ng/animator.js index a69f0784..a8064f5e 100644 --- a/src/ng/animator.js +++ b/src/ng/animator.js @@ -241,7 +241,7 @@ var $AnimatorProvider = function() { if (!parent) { parent = after ? after.parent() : element.parent(); } - if ((!$sniffer.supportsTransitions && !polyfillSetup && !polyfillStart) || + if ((!$sniffer.transitions && !polyfillSetup && !polyfillStart) || (parent.inheritedData(NG_ANIMATE_CONTROLLER) || noop).running) { beforeFn(element, parent, after); afterFn(element, parent, after); 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 }; }]; } diff --git a/src/ngScenario/Application.js b/src/ngScenario/Application.js index 94192b8f..2f8208d2 100644 --- a/src/ngScenario/Application.js +++ b/src/ngScenario/Application.js @@ -75,7 +75,7 @@ angular.scenario.Application.prototype.navigateTo = function(url, loadFn, errorF // we don't need that for our tests, but it should be done $window.angular.resumeBootstrap([['$provide', function($provide) { $provide.decorator('$sniffer', function($delegate) { - $delegate.supportsTransitions = false; + $delegate.transitions = false; return $delegate; }); }]]); |
