Client
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월.
참고 : This feature is only available in Service Workers.
Client 인터페이스는 Worker나 SharedWorker와 같은 실행 가능한 컨텍스트를 나타냅니다. Window 클라이언트는 보다 구체적인 WindowClient로 표현됩니다. Client/WindowClient 객체는 Clients.matchAll()이나 Clients.get()과 같은 메서드를 통해 가져올 수 있습니다.
인스턴스 메서드
Client.postMessage()-
클라이언트에 메시지를 전송합니다.
인스턴스 속성
Client.frameType읽기 전용-
클라이언트의 프레임 타입을 문자열로 나타냅니다.
"auxiliary","top-level","nested", 또는"none"값을 가질 수 있습니다. Client.id읽기 전용-
클라이언트의 범용 고유 식별자를 문자열로 나타냅니다.
Client.type읽기 전용-
클라이언트의 타입을 문자열로 나타냅니다.
"window","worker", 또는"sharedworker"값을 가질 수 있습니다. Client.url읽기 전용-
클라이언트의 URL을 문자열로 나타냅니다.
명세서
| Specification |
|---|
| Service Workers Nightly> # client-interface> |
브라우저 호환성
Loading…