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.

Revision 778599 of Client.id

  • Revision slug: Web/API/Client/id
  • Revision title: Client.id
  • Revision id: 778599
  • Created:
  • Creator: kscarfone
  • Is current revision? No
  • Comment Editorial review

Revision Content

{{SeeCompatTable}}{{APIRef("Service Workers API")}}

The id read-only property of the {{domxref("Client")}} interface returns the id of the {{domxref("Client")}} object.

Syntax

var clientId = Client.id;

Example

TBD

Specifications

Specification Status Comment
{{SpecName('Service Workers', '#client-id', 'id')}} {{Spec2('Service Workers')}} Initial definition.

Browser compatibility

{{CompatibilityTable}}
Feature Chrome Firefox (Gecko) Internet Explorer Opera Safari (WebKit)
Basic support {{CompatChrome(41.0)}} {{CompatUnknown}} {{CompatNo}} {{CompatUnknown}} {{CompatNo}}
Feature Android Firefox Mobile (Gecko) Firefox OS IE Mobile Opera Mobile Safari Mobile Chrome for Android
Basic support {{CompatUnknown}} {{CompatUnknown}} {{CompatUnknown}} {{CompatNo}} {{CompatUnknown}} {{CompatNo}} {{CompatChrome(41.0)}}

Revision Source

<p>{{SeeCompatTable}}{{APIRef("Service Workers API")}}</p>

<p>The <code><strong>id</strong></code> read-only property of the {{domxref("Client")}} interface returns the <code>id</code> of the {{domxref("Client")}} object.</p>

<h2 id="Syntax">Syntax</h2>

<pre class="brush: js">
var clientId = Client.id;</pre>

<h2 id="Example">Example</h2>

<pre class="brush: js">
TBD
</pre>

<h2 id="Specifications" style="line-height: 30px; font-size: 2.14285714285714rem;">Specifications</h2>

<table class="standard-table" style="line-height: 19.0909080505371px;">
 <tbody>
  <tr>
   <th scope="col">Specification</th>
   <th scope="col">Status</th>
   <th scope="col">Comment</th>
  </tr>
  <tr>
   <td>{{SpecName('Service Workers', '#client-id', 'id')}}</td>
   <td>{{Spec2('Service Workers')}}</td>
   <td>Initial definition.</td>
  </tr>
 </tbody>
</table>

<h2 id="Browser_compatibility" style="line-height: 30px; font-size: 2.14285714285714rem;">Browser compatibility</h2>

<div style="line-height: 19.0909080505371px;">{{CompatibilityTable}}</div>

<div id="compat-desktop" style="line-height: 19.0909080505371px;">
<table class="compat-table">
 <tbody>
  <tr>
   <th style="line-height: 16px;">Feature</th>
   <th style="line-height: 16px;">Chrome</th>
   <th style="line-height: 16px;">Firefox (Gecko)</th>
   <th style="line-height: 16px;">Internet Explorer</th>
   <th style="line-height: 16px;">Opera</th>
   <th style="line-height: 16px;">Safari (WebKit)</th>
  </tr>
  <tr>
   <td>Basic support</td>
   <td>{{CompatChrome(41.0)}}</td>
   <td>{{CompatUnknown}}</td>
   <td>{{CompatNo}}</td>
   <td>{{CompatUnknown}}</td>
   <td>{{CompatNo}}</td>
  </tr>
 </tbody>
</table>
</div>

<div id="compat-mobile" style="line-height: 19.0909080505371px;">
<table class="compat-table">
 <tbody>
  <tr>
   <th style="line-height: 16px;">Feature</th>
   <th style="line-height: 16px;">Android</th>
   <th style="line-height: 16px;">Firefox Mobile (Gecko)</th>
   <th style="line-height: 16px;">Firefox OS</th>
   <th style="line-height: 16px;">IE Mobile</th>
   <th style="line-height: 16px;">Opera Mobile</th>
   <th style="line-height: 16px;">Safari Mobile</th>
   <th style="line-height: 16px;">Chrome for Android</th>
  </tr>
  <tr>
   <td>Basic support</td>
   <td>{{CompatUnknown}}</td>
   <td>{{CompatUnknown}}</td>
   <td>{{CompatUnknown}}</td>
   <td>{{CompatNo}}</td>
   <td>{{CompatUnknown}}</td>
   <td>{{CompatNo}}</td>
   <td><span style="line-height: 19.0909080505371px;">{{CompatChrome(41.0)}}</span></td>
  </tr>
 </tbody>
</table>
</div>
Revert to this revision