ServiceWorkerRegistration.active
Experimental: This is an experimental technology
Check the Browser compatibility table carefully before using this in production.
ServiceWorkerRegistration 인터페이스의 active 속성은 ServiceWorker.state (en-US) 가 activating 또는 activated 상태인 서비스 워커를 반환한다. 이 속성은 null 로 초기 설정되어 있다.
클라이언트들의 URL이 등록 scope 내에 있을 경우 active 워커는 ServiceWorkerClient (en-US) 를 제어한다. (ServiceWorkerContainer.register (en-US) 가 처음으로 호출될 때 그 scope 옵션은 정의된다.)
참고: 이 기능은 Web Workers 에서 사용 가능하다.
Syntax
js
sw = ServiceWorker.active
Value
현재 activating 또는 activated 상태에 있다면, ServiceWorker 객체.
명세서
| Specification |
|---|
| Service Workers # navigator-service-worker-active |
브라우저 호환성
BCD tables only load in the browser