Skip to content

Instantly share code, notes, and snippets.

@michal
Created November 26, 2010 19:46
Show Gist options
  • Save michal/717148 to your computer and use it in GitHub Desktop.
Save michal/717148 to your computer and use it in GitHub Desktop.
runCallbacks = function (type, property, key, value) {
var i, j, callbacks = propertyMap[property][type];
for (i = 0, j = callbacks.length; i < j; i += 1) {
(function(callbacks, i, key, value) {
window.setTimeout(function () {
callbacks[i](key, value);
}, 0);
})(callbacks, i, key, value);
}
},
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment