mirror of
https://git.kescher.at/CatCatNya/catstodon.git
synced 2024-11-28 00:11:37 +01:00
7 lines
197 B
JavaScript
7 lines
197 B
JavaScript
export default function ready(loaded) {
|
|
if (['interactive', 'complete'].includes(document.readyState)) {
|
|
loaded();
|
|
} else {
|
|
document.addEventListener('DOMContentLoaded', loaded);
|
|
}
|
|
}
|