簡體   English   中英

調用API時,加載程序圖片未在Chrome中加載

[英]Loader image is not loading in chrome, while calling an API

我在chrome瀏覽器中有問題。

API調用時未加載加載程序圖像或文本。

Chrome會在調用API時延遲其他操作,直至陷入困境。

我的代碼結構是

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 
} 

它已在IE,Firefox等瀏覽器中運行,但在chrome瀏覽器中卻無法運行

有人可以幫忙嗎?

謝謝。

您是否使用您使用的功能正確擴展了查詢? dojo.query在關於本機選擇,發動機是否是“足夠”有不同的加載..

嘗試在查詢調用周圍添加(僅1.7+)需求到dojo / NodeList-dom

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 
});

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM