--- title: Client slug: Web/API/Client tags: - API - Client - Experimental - Interface - NeedsTranslation - Reference - Service Workers - ServiceWorkerClient - ServiceWorkers - TopicStub translation_of: Web/API/Client ---
{{SeeCompatTable}}{{APIRef("Service Workers API")}}
Client
接口表示一个可执行的上下文,如{{domxref("Worker")}}或{{domxref("SharedWorker")}}。{{domxref("Window")}} 客户端由更具体的{{domxref("WindowClient")}}表示。 你可以从{{domxref("Clients.matchAll","Clients.matchAll()")}} 和{{domxref("Clients.get","Clients.get()")}}等方法获取Client
/WindowClient
对象。
window"
, "worker"
, 或 "sharedworker"。
Specification | Status | Comment |
---|---|---|
{{SpecName('Service Workers', '#client', 'Client')}} | {{Spec2('Service Workers')}} | Initial definition. |