From 81a46f349544d5d8c05e9df92fe4ef62b6f01fdd Mon Sep 17 00:00:00 2001 From: e7d Date: Sun, 14 May 2017 14:38:42 +0200 Subject: [PATCH] fixed "Illegal Invocation" of request animation frame --- js/gamepad.js | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/js/gamepad.js b/js/gamepad.js index fab06ec..07255bf 100644 --- a/js/gamepad.js +++ b/js/gamepad.js @@ -1,9 +1,6 @@ class Gamepad { constructor() { this.haveEvents = 'GamepadEvent' in window; - this.rAF = window.mozRequestAnimationFrame || - window.webkitRequestAnimationFrame || - window.requestAnimationFrame; // cached DOM references this.$gamepad = $('.gamepad'); @@ -291,7 +288,7 @@ class Gamepad { } // enqueue the next refresh right away - this.rAF(this.updateStatus.bind(this)); + window.requestAnimationFrame(this.updateStatus.bind(this)); // load latest gamepad data this.refreshGamepads();