Don't needlessly observe iframes while loading
because the browser starts loading iframes after DOMContentLoaded event anyway
This commit is contained in:
parent
3cf32048ed
commit
a1ab89e7ea
6
apply.js
6
apply.js
|
@ -142,8 +142,10 @@ function applyStyles(styleHash) {
|
|||
document.head.appendChild(document.getElementById(id));
|
||||
}
|
||||
}
|
||||
document.addEventListener("DOMContentLoaded", addDocumentStylesToAllIFrames);
|
||||
iframeObserver.start();
|
||||
document.addEventListener("DOMContentLoaded", function() {
|
||||
addDocumentStylesToAllIFrames();
|
||||
iframeObserver.start();
|
||||
});
|
||||
}
|
||||
|
||||
if (retiredStyleIds.length) {
|
||||
|
|
Loading…
Reference in New Issue
Block a user