mirror of
https://github.com/mastodon/mastodon.git
synced 2024-11-15 19:31:42 +00: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);
|
||
|
}
|
||
|
}
|