Lightweight JavaScript function queue.