Merge pull request #88 from teldosas/patch-1

Replace onLoad  with addEventListener
This commit is contained in:
Andrei Chelaru
2020-04-26 14:16:03 +03:00
committed by GitHub

View File

@@ -413,9 +413,9 @@ function initializeWhenReady(document) {
if (isBlacklisted()) { if (isBlacklisted()) {
return; return;
} }
window.onload = () => { window.addEventListener('load', () => {
initializeNow(window.document); initializeNow(window.document);
}; });
if (document) { if (document) {
if (document.readyState === "complete") { if (document.readyState === "complete") {
initializeNow(document); initializeNow(document);