ugly modification

This commit is contained in:
xiaolai 2022-12-09 00:45:42 +08:00
parent af637c7a6d
commit 9e6ac7777c
3 changed files with 39 additions and 13 deletions

View file

@ -767,13 +767,15 @@
}
autoSpacing () {
document.addEventListener('DOMContentLoaded', () => {
const callback = () => {
const $$rootList = document.querySelectorAll(this.rootSelector);
for (let $$root of $$rootList) {
this.spacingElement($$root);
}
});
};
if (document.readyState === 'complete') setTimeout(callback);
else document.addEventListener('DOMContentLoaded', callback);
}
}