1
0
mirror of https://github.com/funamitech/mastodon synced 2024-11-30 07:49:04 +09:00
YuruToot/app/javascript/mastodon/ready.js

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);
}
}