1
0
mirror of https://github.com/glitch-soc/mastodon.git synced 2025-01-29 11:03:08 -05:00

8 lines
197 B
JavaScript
Raw Normal View History

export default function ready(loaded) {
if (['interactive', 'complete'].includes(document.readyState)) {
loaded();
} else {
document.addEventListener('DOMContentLoaded', loaded);
}
}