Skip to content

Commit

Permalink
Remove ServiceWorker.id; not mandate UUID for service worker / servic…
Browse files Browse the repository at this point in the history
…e worker client's id.
  • Loading branch information
jungkees committed Aug 13, 2015
1 parent 73e18f4 commit 66ff7c7
Showing 1 changed file with 3 additions and 11 deletions.
14 changes: 3 additions & 11 deletions spec/service_worker/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,6 @@ <h1>Dependencies</h1>
<li><a href="https://w3c.github.io/webappsec/specs/powerfulfeatures/">Secure Contexts</a></li>
<li><a href="http://www.w3.org/2001/tag/doc/promises-guide">Writing Promise-Using Specifications</a></li>
<li><a href="http://www.w3.org/TR/page-visibility/">Page Visibility (Second Edition)</a></li>
<li><a href="http://tools.ietf.org/html/rfc4122">A Universally Unique IDentifier (UUID) URN Namespace</a></li>
<li><a href="http://www.w3.org/2001/tag/doc/unsanctioned-tracking/">(Non-normative) Unsanctioned Web Tracking</a></li>
</ul>
</spec-section>
Expand Down Expand Up @@ -136,7 +135,7 @@ <h1>Service Worker</h1>
<p>A <a href="#dfn-service-worker">service worker</a> has an associated <dfn id="dfn-state">state</dfn>, which is one of <em>parsed</em>, <em>installing</em>, <em>installed</em>, <em>activating</em>, <em>activated</em>, and <em>redundant</em>. (Initially <em>parsed</em>).</p>
<p>A <a href="#dfn-service-worker">service worker</a> has an associated <dfn id="dfn-script-url">script url</dfn> (a <a href="https://url.spec.whatwg.org/#concept-url">URL</a>).</p>
<p>A <a href="#dfn-service-worker">service worker</a> has an associated <dfn id="dfn-containing-service-worker-registration">containing service worker registration</dfn> (a <a href="#dfn-service-worker-registration">service worker registration</a>), which contains itself.</p>
<p>A <a href="#dfn-service-worker">service worker</a> has an associated <dfn id="dfn-service-worker-id">id</dfn> (a <a href="http://tools.ietf.org/html/rfc4122#section-3">UUID</a>), which uniquely identifies itself during the lifetime of its <a href="#dfn-containing-service-worker-registration">containing service worker registration</a>.</p>
<p>A <a href="#dfn-service-worker">service worker</a> has an associated <dfn id="dfn-service-worker-id">id</dfn> (an opaque string), which uniquely identifies itself during the lifetime of its <a href="#dfn-containing-service-worker-registration">containing service worker registration</a>.</p>
<p>A <a href="#dfn-service-worker">service worker</a> is dispatched a set of <dfn id="dfn-lifecycle-events">lifecycle events</dfn>, <a href="#service-worker-global-scope-install-event">install</a> and <a href="#service-worker-global-scope-activate-event">activate</a>, and <dfn id="dfn-functional-events">functional events</dfn> including <a href="#service-worker-global-scope-fetch-event">fetch</a>.</p>
<p>A <a href="#dfn-service-worker">service worker</a> has an associated <dfn id="dfn-script-resource">script resource</dfn>, which represents its own script resource. It is initially set to null.</p>
<p>A <a href="#dfn-service-worker">service worker</a> has an associated <dfn id="dfn-max-age">max age</dfn>. It is initially set to null.</p>
Expand Down Expand Up @@ -173,7 +172,7 @@ <h1>Service Worker Client</h1>

<p>A <a href="#dfn-service-worker-client">service worker client</a> has an associated <dfn id="dfn-service-worker-client-active-worker">active worker</dfn> (an <a href="#dfn-active-worker">active worker</a>) which currently <a href="#dfn-control">controls</a> it. It is initially set to null.</p>

<p>A <a href="#dfn-service-worker-client">service worker client</a> has an associated <dfn id="dfn-service-worker-client-id">id</dfn> (a <a href="http://tools.ietf.org/html/rfc4122#section-3">UUID</a>), which uniquely identifies itself during its lifetime. It is initially set to a new <a href="http://tools.ietf.org/html/rfc4122#section-3">UUID</a> when the corresponding <a href="https://html.spec.whatwg.org/multipage/webappapis.html#environment-settings-object">environment settings object</a> that it represents is created.</p>
<p>A <a href="#dfn-service-worker-client">service worker client</a> has an associated <dfn id="dfn-service-worker-client-id">id</dfn> (an opaque string), which uniquely identifies itself during its lifetime. It is initially set to a new unique value when the corresponding <a href="https://html.spec.whatwg.org/multipage/webappapis.html#environment-settings-object">environment settings object</a> that it represents is created.</p>

<p>A <dfn id="dfn-window-client">window client</dfn> is a <a href="#dfn-service-worker-client">service worker client</a> whose <a href="https://html.spec.whatwg.org/multipage/webappapis.html#global-object">global object</a> is a <a href="https://html.spec.whatwg.org/multipage/browsers.html#window">Window</a> object.</p>

Expand Down Expand Up @@ -213,7 +212,6 @@ <h1><code>ServiceWorker</code></h1>
interface <dfn id="service-worker-interface" title="ServiceWorker">ServiceWorker</dfn> : <a href="https://dom.spec.whatwg.org/#eventtarget">EventTarget</a> {
readonly attribute <a href="http://heycam.github.io/webidl/#idl-USVString">USVString</a> <a href="#service-worker-url-attribute">scriptURL</a>;
readonly attribute <a href="#service-worker-state-enum">ServiceWorkerState</a> <a href="#service-worker-state-attribute">state</a>;
readonly attribute DOMString <a href="#service-worker-id-attribute">id</a>;
void <a href="#service-worker-postmessage-method">postMessage</a>(any <var>message</var>, optional sequence&lt;<a href="https://html.spec.whatwg.org/multipage/infrastructure.html#transferable">Transferable</a>&gt; <var>transfer</var>);

// event
Expand Down Expand Up @@ -276,12 +274,6 @@ <h1><code>state</code></h1>
</dl>
</spec-section>

<spec-section id="service-worker-id">
<h1><code>id</code></h1>

<p>The <dfn id="service-worker-id-attribute"><code>id</code></dfn> attribute <em class="rfc2119" title="MUST">must</em> return the <a href="#dfn-service-worker">service worker</a>'s <a href="#dfn-service-worker-id">id</a>.</p>
</spec-section>

<spec-section id="service-worker-postmessage">
<h1><code>postMessage(<var>message</var>, <var>transfer</var>)</code></h1>

Expand Down Expand Up @@ -2563,7 +2555,7 @@ <h1>Update</h1>
<li>Else:
<ol>
<li>Let <var>worker</var> be a new <a href="#dfn-service-worker">service worker</a>.</li>
<li>Generate a new <a href="http://tools.ietf.org/html/rfc4122#section-3">UUID</a> and set <var>worker</var>'s <a href="#dfn-service-worker-id">id</a> to the value.</li>
<li>Generate a unique opaque string and set <var>worker</var>'s <a href="#dfn-service-worker-id">id</a> to the value.</li>
<li>Set <var>worker</var>'s <a href="#dfn-script-url">script url</a> to <var>registration</var>'s <a href="#dfn-registration-script-url">registering script url</a>, <var>worker</var>'s <a href="#dfn-script-resource">script resource</a> to the script resource retrieved from the fetched <var>response</var>, and <var>worker</var>'s <a href="#dfn-max-age">max age</a> to 86400.</li>
<li>If <var>response</var>'s <a href="https://fetch.spec.whatwg.org/#concept-response-header-list">header list</a> has a <a href="https://fetch.spec.whatwg.org/#concept-header">header</a> <var>h</var> whose <a href="https://fetch.spec.whatwg.org/#concept-header-name">name</a> is `<code>Cache-Control</code>`, then:
<ol>
Expand Down

0 comments on commit 66ff7c7

Please sign in to comment.