Skip to content

Instantly share code, notes, and snippets.

View honmaaax's full-sized avatar

Hitoshi Honma honmaaax

View GitHub Profile
@honmaaax
honmaaax / ios6-timers.js
Created October 16, 2012 03:08 — forked from ronkorving/ios6-timers.js
iOS6 webkit timer bug workaround
(function (window) {
// This library re-implements setTimeout, setInterval, clearTimeout, clearInterval for iOS6.
// iOS6 suffers from a bug that kills timers that are created while a page is scrolling.
// This library fixes that problem by recreating timers after scrolling finishes (with interval correction).
// This code is free to use by anyone (MIT, blabla).
// Author: rkorving@wizcorp.jp
var timeouts = {};
var intervals = {};