1
0
mirror of https://github.com/glitch-soc/mastodon.git synced 2025-02-16 07:33:51 -05:00
2017-07-14 11:08:56 +02:00

8 lines
197 B
JavaScript

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