document 상태

지니씨·2023년 3월 3일
0

프론트엔드

목록 보기
66/84

document.readyState

document.readyState를 이용해 document의 로딩시점에 따라 다른 이벤트를 실행시킬 수 있음

readyState의 값은 loading, interactive, complete 이 있는데,

loading
: document 로딩중 상태

interactive ( DOMContentLoaded 와 같은 상태 )
: 파싱은 되었지만 리소스(이미지, 스타일 등) 로딩 전, 돔트리에는 접근 가능

complete ( window.load 와 같으 상태 )
: 완료

document, window event

https://ko.javascript.info/onload-ondomcontentloaded

The popstate event
https://gomakethings.com/how-to-detect-when-the-browser-url-changes-with-vanilla-js/

기타

window.global = window; // window 객체를 global 변수에 할당

javascript on document.location.search change

https://stackoverflow.com/questions/58039669/how-to-listen-for-changes-to-window-location-search-in-2019

https://stackoverflow.com/questions/680785/how-can-i-detect-changes-in-location-hash

https://stackoverflow.com/questions/680785/how-can-i-detect-changes-in-location-hash

https://stackoverflow.com/questions/33355581/javascript-on-document-location-search-change
==> ing

profile
하루 모아 평생 🧚🏻

0개의 댓글