0

This is the whole file, it's saying: Unused 'callback' which I'm not sure how to work around. Anyone got any ideas?

//////////////////////////////////////////////////////////////////////

/*global window, performance */

//////////////////////////////////////////////////////////////////////

window.requestAnimFrame = (function (callback) {
    "use strict";
    return window.requestAnimationFrame ||
        window.webkitRequestAnimationFrame ||
        window.mozRequestAnimationFrame ||
        window.oRequestAnimationFrame ||
        window.msRequestAnimationFrame ||
        function (callback) {
            window.setTimeout(callback, 1000 / 60);
        };
}());

//////////////////////////////////////////////////////////////////////

window.performance = window.performance || {};

performance.now = (function () {
    "use strict";
    return performance.now ||
            performance.mozNow ||
            performance.msNow ||
            performance.oNow ||
            performance.webkitNow ||
        function () {
            return new Date().getTime();
        };
}());

//////////////////////////////////////////////////////////////////////
Charlie Skilbeck
  • 1,081
  • 2
  • 15
  • 38
  • 1
    You're shadowing the `shadow` parameter in the `requestAnimFrame` method with the one in the anonymous function that is potentially returned. So the first one will never be used since only that anonymous function references `callback`. Seems like an appropriate warning. – cookie monster Mar 30 '14 at 22:22

1 Answers1

1

window.requestAnimFrame = (function (callback) {

callback is never used.

Cjmarkham
  • 9,484
  • 5
  • 48
  • 81