Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

Commit 3919fc1

Browse files
committed
chore($$raf) Remove support for prefixed requestAnimationFrame
1 parent b6f4d4b commit 3919fc1

File tree

1 file changed

+3
-12
lines changed

1 file changed

+3
-12
lines changed

src/ng/raf.js

+3-12
Original file line numberDiff line numberDiff line change
@@ -2,21 +2,12 @@
22

33
function $$RAFProvider(){ //rAF
44
this.$get = ['$window', '$timeout', function($window, $timeout) {
5-
var requestAnimationFrame = $window.requestAnimationFrame ||
6-
$window.webkitRequestAnimationFrame ||
7-
$window.mozRequestAnimationFrame;
8-
9-
var cancelAnimationFrame = $window.cancelAnimationFrame ||
10-
$window.webkitCancelAnimationFrame ||
11-
$window.mozCancelAnimationFrame ||
12-
$window.webkitCancelRequestAnimationFrame;
13-
14-
var rafSupported = !!requestAnimationFrame;
5+
var rafSupported = !!$window.requestAnimationFrame;
156
var raf = rafSupported
167
? function(fn) {
17-
var id = requestAnimationFrame(fn);
8+
var id = $window.requestAnimationFrame(fn);
189
return function() {
19-
cancelAnimationFrame(id);
10+
$window.cancelAnimationFrame(id);
2011
};
2112
}
2213
: function(fn) {

0 commit comments

Comments
 (0)