refac: 500px 모드 변환기 분리

This commit is contained in:
2021-12-04 11:42:26 +09:00
parent 5b6e15c5fd
commit acbbe2c353
3 changed files with 73 additions and 50 deletions
+7
View File
@@ -0,0 +1,7 @@
export function htmlReady(fn: () => unknown): void {
if (document.readyState != 'loading') {
fn();
} else {
document.addEventListener('DOMContentLoaded', fn);
}
}