From a93667dae55db254d4c8044b04e13170422a3aae Mon Sep 17 00:00:00 2001 From: yhx9527 Date: Wed, 21 Jul 2021 18:17:24 +0800 Subject: [PATCH] fix: requestAnimationFrame should ensure bind window --- src/dom/DomEvent.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/dom/DomEvent.js b/src/dom/DomEvent.js index 37ed76fb19..7c4de70344 100644 --- a/src/dom/DomEvent.js +++ b/src/dom/DomEvent.js @@ -85,6 +85,9 @@ DomEvent.requestAnimationFrame = new function() { requested = false, callbacks = [], timer; + if (nativeRequest) { + nativeRequest = nativeRequest.bind(window); + } function handleCallbacks() { // Make a local references to the current callbacks array and set