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
4
apply.js
4
apply.js
|
@ -142,8 +142,10 @@ function applyStyles(styleHash) {
|
||||||
document.head.appendChild(document.getElementById(id));
|
document.head.appendChild(document.getElementById(id));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
document.addEventListener("DOMContentLoaded", addDocumentStylesToAllIFrames);
|
document.addEventListener("DOMContentLoaded", function() {
|
||||||
|
addDocumentStylesToAllIFrames();
|
||||||
iframeObserver.start();
|
iframeObserver.start();
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
if (retiredStyleIds.length) {
|
if (retiredStyleIds.length) {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user