aboutsummaryrefslogtreecommitdiffstats
path: root/src/ng/asyncCallback.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/ng/asyncCallback.js')
-rw-r--r--src/ng/asyncCallback.js11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/ng/asyncCallback.js b/src/ng/asyncCallback.js
new file mode 100644
index 00000000..8bede73a
--- /dev/null
+++ b/src/ng/asyncCallback.js
@@ -0,0 +1,11 @@
+'use strict';
+
+function $$AsyncCallbackProvider(){
+ this.$get = ['$$rAF', '$timeout', function($$rAF, $timeout) {
+ return $$rAF.supported
+ ? function(fn) { return $$rAF(fn); }
+ : function(fn) {
+ return $timeout(fn, 0, false);
+ };
+ }];
+}