This page was translated from English by the community. Learn more and join the MDN Web Docs community.

View in English Always switch to English

ServiceWorkerRegistration.active

Baseline Widely available

This feature is well established and works across many devices and browser versions. It’s been available across browsers since ⁨2018년 4월⁩.

Experimental: 이 기능은 실험적인 기능입니다.
프로덕션 환경에서 사용하기 전에 브라우저 호환성 표를 주의 깊게 확인하세요.

ServiceWorkerRegistration 인터페이스의 active 속성은 ServiceWorker.stateactivating 또는 activated 상태인 서비스 워커를 반환한다. 이 속성은 null 로 초기 설정되어 있다.

클라이언트들의 URL이 등록 scope 내에 있을 경우 active 워커는 ServiceWorkerClient 를 제어한다. (ServiceWorkerContainer.register 가 처음으로 호출될 때 그 scope 옵션은 정의된다.)

참고 : 이 기능은 Web Workers 에서 사용 가능하다.