Enqueue calls to asynchronous Javascript function or method