How to execute Ares/javascript code in the background?

I have a busy Ares/javascript method that busy runs for a few seconds.
During this execution time I want to display a spinner to indicate to the user that some activity is going on. When activity is over I would stop the spinner.

BUT - today when I start the spinner the javascript code is so busy in my method that there is no updated of the spinner at all. How can I execute both items in parallel (spinner and my busy method)?
I could not find any Ares support for this.


  • Javascript isn't multithreaded -- it's going to run your code until you return to the system. So, if you want to give time for a spinner to run, you need to stop processing periodically and schedule more work using something like enyo.asyncMethod,
Sign In or Register to comment.