search

Home  >  Q&A  >  body text

javascript - Google Chrome blocks the effect of loading layer

The situation is as follows:
The front end initiates a request to the back end. This request takes a long time and is likely to fail. At this time, the front end adds a loading layer
Firefox browser: This loading The layer can run normally until the background returns, and then the front-end reports an error
Google Chrome: This loading layer can run normally at first, but immediately enters a pause state and is stuck until the background returns the results, and then reports an error

Excuse me:
1. What is the cause of this?
2. How to solve this situation?

$.delayLoad(function(dlIndex) {

    请求操作...

    // 关闭等待层
    layer.close(dlIndex);

});


附:($.delayLoad方法源码)

漂亮男人漂亮男人2780 days ago668

reply all(1)I'll reply

  • 天蓬老师

    天蓬老师2017-05-19 10:28:02

    How did you write the loading effect?

    reply
    0
  • Cancelreply