Spin wheel in dojo framework

90 views Asked by At

I have a piece of code

this.domNode.classList.add('widget-loading');

which is adding a spin wheel. Now I want to sustain the spin wheel for 10 seconds. I tried the below which dint work.

setTimeout(function(){ this.domNode.classList.add('widget-loading')},10000); 

Could anyone help me out with this?

Thanks

1

There are 1 answers

0
Jean-Claude Hujeux On

Although I am not familiar with classList, I suggest to try this:

var classList = this.domNode.classList;
classList.add('widget-loading');
setTimeout(function(){classList.remove('widget-loading', 10000)});