Skip to content

Instantly share code, notes, and snippets.

@soapdog
Created January 10, 2014 23:15
Show Gist options
  • Save soapdog/8364556 to your computer and use it in GitHub Desktop.
Save soapdog/8364556 to your computer and use it in GitHub Desktop.
function fireReadyCallbacks(url) {
// Fire all ready callbacks we have queued up.
console.log("Available callbacks", _readyCallbacks)
while(_readyCallbacks.length > 0) {
var callback = _readyCallbacks.pop()
if (typeof callback === "function") {
console.log("Callback available, firing it", callback);
callback();
} else {
console.log("What?!?!", callback);
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment