Skip to content

Commit cfafd50

Browse files
authored
Remove support for older browser without requestAnimationFrame (#24688)
All the browsers we support have had requestAnimationFrame for a long time now.
1 parent e236fa3 commit cfafd50

File tree

2 files changed

+2
-19
lines changed

2 files changed

+2
-19
lines changed

src/lib/libeventloop.js

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -300,20 +300,9 @@ LibraryJSEventLoop = {
300300
requestAnimationFrame(func) {
301301
if (typeof requestAnimationFrame == 'function') {
302302
requestAnimationFrame(func);
303-
return;
304-
}
305-
var RAF = MainLoop.fakeRequestAnimationFrame;
306-
#if LEGACY_VM_SUPPORT
307-
if (typeof window != 'undefined') {
308-
RAF = window['requestAnimationFrame'] ||
309-
window['mozRequestAnimationFrame'] ||
310-
window['webkitRequestAnimationFrame'] ||
311-
window['msRequestAnimationFrame'] ||
312-
window['oRequestAnimationFrame'] ||
313-
RAF;
303+
} else {
304+
MainLoop.fakeRequestAnimationFrame(func);
314305
}
315-
#endif
316-
RAF(func);
317306
},
318307
},
319308

src/proxyClient.js

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -107,12 +107,6 @@ function renderFrame() {
107107
renderFrameData = null;
108108
}
109109

110-
if (typeof window != 'undefined') {
111-
window.requestAnimationFrame = window.requestAnimationFrame || window.mozRequestAnimationFrame ||
112-
window.webkitRequestAnimationFrame || window.msRequestAnimationFrame ||
113-
renderFrame;
114-
}
115-
116110
/*
117111
(() => {
118112
var trueRAF = window.requestAnimationFrame;

0 commit comments

Comments
 (0)