Skip to content

Commit

Permalink
Merge pull request #230 from w3c/jakearchibald-patch-1
Browse files Browse the repository at this point in the history
Reject if there's no active service worker
  • Loading branch information
martinthomson authored Dec 14, 2016
2 parents 58ebd6e + 9349b66 commit e1f31d4
Showing 1 changed file with 3 additions and 18 deletions.
21 changes: 3 additions & 18 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -604,24 +604,9 @@ <h2>
<li>Let <var>registration</var> be the <code><a>PushManager</a></code>'s associated
<a>service worker registration</a>.
</li>
<li>If <var>registration</var> has no <a>active worker</a>, run the following substeps:
<ol>
<li>If <var>registration</var> has no <a>installing worker</a> and no <a>waiting
worker</a>, reject <var>promise</var> with a <code><a>DOMException</a></code> whose
name is "<code><a>InvalidStateError</a></code>" and terminate these steps.
</li>
<li>Wait for the <a>installing worker</a> or <a>waiting worker</a> of
<var>registration</var> to become its <a>active worker</a>.
</li>
<li>If <var>registration</var> fails to activate either worker, reject
<var>promise</var> with a <code><a>DOMException</a></code> whose name is
"<code><a>InvalidStateError</a></code>" and terminate these steps.
</li>
<li>Once <var>registration</var> has an <a>active worker</a>, proceed with the steps
below.
</li>
</ol>
</li>
<li>If <var>registration</var>'s <a>active worker</a> is null, reject <var>promise</var>
with a <code><a>DOMException</a></code> whose name is
"<code><a>InvalidStateError</a></code>" and terminate these steps.</li>
<li>Ask the user whether they allow the <a>webapp</a> to receive <a>push messages</a>,
unless a prearranged trust relationship applies or the user has already granted or denied
permission explicitly for this <a>webapp</a>.
Expand Down

0 comments on commit e1f31d4

Please sign in to comment.