Skip to content

Commit

Permalink
fix: requestAnimationFrame should ensure bind window
Browse files Browse the repository at this point in the history
  • Loading branch information
yhx9527 committed Jul 21, 2021
1 parent 53b98de commit a93667d
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/dom/DomEvent.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit a93667d

Please sign in to comment.