context.clearTimeout = function (to) { var res = clearTimeout.apply ? clearTimeout.apply(this, arguments) : apply(clearTimeout, this, arguments) ; var i = timeouts.indexOf(to); if (i >= 0) timeouts.splice(i, 1); compiled.checkStopped() return res; };
context.clearInterval = function (iv) { var res = clearInterval.apply ? clearInterval.apply(this, arguments) : apply(clearInterval, this, arguments) ; var i = intervals.indexOf(iv); if (i >= 0) intervals.splice(i, 1); compiled.checkStopped(); return res; };
function wrappedCallback () { var res = callback() context.clearTimeout(to); compiled.checkStopped(); return res; }
compiled.removeCallback = function unregister (wrappedCallback) { var i = callbacks.indexOf(wrappedCallback); if (i >= 0) callbacks.splice(i, 1); compiled.checkStopped(); }