Example of context.async

Does anybody have an example of how to use the async function in plugin’s context? In documentation it is described as

async: function(callback: function(err, url)) - takes a function that kicks off an async operation

When calling RESTful services with various implementations around XMLHttpRequest object, the calls should be asynchronous, with promises, etc. I tried to execute some simple code with that, but it doesn’t work as I suppose it should.

I realize it’s more than a year later, but @Kfawcett, with the help of some JS gurus, managed to work this out.

1 Like