Don't needlessly observe iframes while loading

because the browser starts loading iframes after DOMContentLoaded event anyway
This commit is contained in:
tophf 2016-01-25 07:10:00 +03:00
parent 3cf32048ed
commit a1ab89e7ea

View File

@ -142,8 +142,10 @@ function applyStyles(styleHash) {
document.head.appendChild(document.getElementById(id));
}
}
document.addEventListener("DOMContentLoaded", addDocumentStylesToAllIFrames);
document.addEventListener("DOMContentLoaded", function() {
addDocumentStylesToAllIFrames();
iframeObserver.start();
});
}
if (retiredStyleIds.length) {