Reputation: 450
I have the issue in chrome browser.
Loader image or text not loading, while API calls.
Chrome delays other actions while calling API and down into stuckness.
My code structure is
Placed a span with loader background,
<span id='logging' class='hide'></span>
Click on 'Login' Button,
{
dojo.query('#logging').removeClass('hide'); // Show the loader
<API Call Script here.>
dojo.query('#logging').addClass('hide'); // Hide the loader
}
It has been working in browser IE, Firefox .. etc, but not in chrome browser
Can anyone help?
Thank You.
Upvotes: 0
Views: 142
Reputation: 8641
Have you extended the query correctly with the functionality youre using? dojo.query is loaded differently in regards to whether or not the native selector-engine is 'sufficient'..
Try adding (1.7+ only) a require to dojo/NodeList-dom around the query calls
require(["dojo/query", "dojo/NodeList-dom"], function(dj_query){
dj_query('#logging').removeClass('hide'); // Show the loader
<API Call Script here.>
dj_query('#logging').addClass('hide'); // Hide the loader
});
Upvotes: 0