mirror of
https://git.bsd.gay/fef/nyastodon.git
synced 2024-11-01 23:21:11 +01:00
8 lines
197 B
JavaScript
8 lines
197 B
JavaScript
|
export default function ready(loaded) {
|
||
|
if (['interactive', 'complete'].includes(document.readyState)) {
|
||
|
loaded();
|
||
|
} else {
|
||
|
document.addEventListener('DOMContentLoaded', loaded);
|
||
|
}
|
||
|
}
|