-
navigator.onLine컴퓨터/JavaScript_typescript 2021. 11. 22. 11:46
* navigator.onLine
return true or false (boolean)
온라인 상태인지, 오프라인상태인지 확인할 수 있다* Returns the online status of the browser. The property returns a boolean value, with true meaning online and false meaning offline. The property sends updates whenever the browser's ability to connect to the network changes. The update occurs when the user follows links or when a script requests a remote page. For example, the property should return false when users click links soon after they lose internet connection.
source: https://developer.mozilla.org/en-US/docs/Web/API/Navigator/onLine
'컴퓨터 > JavaScript_typescript' 카테고리의 다른 글
타입스크립트 타입시스템에 대한 이해 (0) 2021.08.04 Emmet + visual studio code extensions 추천 (0) 2021.03.22 개별 모듈로 분할하기: CommonJS vs ECMAScript module (0) 2021.02.18 [JavaScript] new FormData(form), Object.fromEntries(iterable), how to seriazlie form data (0) 2021.01.31 [ JavaScrip ] 객체 생성 방식, OrdinaryObjectCreate (0) 2021.01.21