This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Sometimes you need to queue things up before a callback is available. This solves that issue. | |
Push any item(s) to an array. | |
Once you want to start consuming these items, pass the array and a callback to QueuedCallback(). | |
QueuedCallback will overload array.push as your callback and then cycle through any queued up items. | |
Continue to push items to that array and they will be forwarded directly to your callback. The array will remain empty. | |
Compatible with all browsers and IE 5.5+. | |
*/ |