We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
setTimeout
1 parent 69d3cdc commit c711d2aCopy full SHA for c711d2a
extension/src/json-viewer/load-css.js
@@ -33,13 +33,13 @@ function loadCSS(opts) {
33
}
34
35
if (/loaded/.test(content)) {
36
- clearTimeout(scheduleId);
+ cancelAnimationFrame(scheduleId);
37
document.body.removeChild(checkElement);
38
resolve();
39
40
} else {
41
attempts++;
42
- scheduleId = setTimeout(scheduleCheck, 1);
+ scheduleId = requestAnimationFrame(scheduleCheck, 1);
43
44
45
0 commit comments