Please note, this is a STATIC archive of website developer.mozilla.org from 03 Nov 2016, cach3.com does not collect or store any user information, there is no "phishing" involved.

この記事は技術レビューを必要としています。ぜひご協力ください

この記事はまだボランティアによって 日本語 に翻訳されていません。ぜひ MDN に参加して翻訳を手伝ってください!

This is an experimental technology
Because this technology's specification has not stabilized, check the compatibility table for the proper prefixes to use in various browsers. Also note that the syntax and behavior of an experimental technology is subject to change in future versions of browsers as the spec changes.

Deprecated
This feature has been removed from the Web standards. Though some browsers may still support it, it is in the process of being dropped. Do not use it in old or new projects. Pages or Web apps using it may break at any time.

The FetchEvent.client read-only property returns the Client that the current service worker is controlling.

Note: This feature has been deprecated, with its functionality replaced by FetchEvent.clientId and Clients.get(). See this Github issue for discussion/background.

Syntax

var myClient = FetchEvent.client;

Value

A Client object.

Example

self.addEventListener('fetch', function(event) {
  console.log(event.client);
​});

Specifications

Specification Status Comment
Service Workers
The definition of 'FetchEvent' in that specification.
Working Draft Initial definition.

Browser compatibility

Feature Chrome Firefox (Gecko) Internet Explorer Opera Safari (WebKit)
Basic support 40.0 44.0 (44.0) Not supported 24 Not supported
Feature Android Android Webview Firefox Mobile (Gecko) Firefox OS IE Mobile Opera Mobile Safari Mobile Chrome for Android
Basic support Not supported ? 44.0 (44.0) (Yes) Not supported ? Not supported 44.0

See also

ドキュメントのタグと貢献者

 このページの貢献者: chrisdavidmills, jpmedley, Sebastianz, teoli, kscarfone
 最終更新者: chrisdavidmills,