Allow asynchronous APIs to be scripted using pure synchronous JavaScript.