1
0
mirror of https://github.com/glitch-soc/mastodon.git synced 2025-01-27 01:52:55 -05:00
2017-12-03 23:26:40 -08:00

8 lines
197 B
JavaScript

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