Skip to content

Instantly share code, notes, and snippets.

@bloodyowl
Created December 10, 2012 16:07
Show Gist options
  • Save bloodyowl/4251514 to your computer and use it in GitHub Desktop.
Save bloodyowl/4251514 to your computer and use it in GitHub Desktop.
;(function(){
var foo = synchronousRequestInit
, bar = synchronousRequestInit
, fooResponse
, barResponse
, i = false
, interval
window.setTimeout(function(){
fooResponse = foo.update()
barResponse = bar.update()
i = true
}, 0)
interval = window.setInterval(function(){
if(!i) return
else {
callback(fooResponse, barResponse)
window.clearInterval(interval)
}
}, 30)
})()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment