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.

FetchEvent.client

Эта статья нуждается в техническом обзоре. Как вы можете помочь.

Наши волонтёры ещё не перевели данную статью на Русский. Присоединяйтесь к нам и помогите закончить эту работу!

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,