Skip to content

Commit

Permalink
Make respondWith(r) throws against error conditions
Browse files Browse the repository at this point in the history
  • Loading branch information
jungkees committed Aug 5, 2014
1 parent feae6eb commit f60dfca
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion spec/service_worker/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -1492,14 +1492,16 @@ <h1><code>event.respondWith(r)</code></h1>
</li>
<li>Set the <a href="#wait-to-respond-flag">wait to respond flag</a>.</li>
<li>Wait until <var>r</var> settles.</li>
<li>If <var>r</var> rejected, then:
<li>If <var>r</var> rejected with an exception, then:
<ol>
<li>Set the <a href="#respond-with-error-flag">respond-with error flag</a>.</li>
<li><a href="http://dom.spec.whatwg.org/#concept-throw">Throw</a> that exception.</li>
</ol>
</li>
<li>If <var>r</var> resolves to <var>response</var>, an instance of <code><a href="http://fetch.spec.whatwg.org/#response">Response</a></code> interface whose <code>type</code> attribute is "<code>opaque</code>", and the <code><a href="#context-enum">context</a></code> attribute is "<code>navigate</code>", then:
<ol>
<li>Set the <a href="#respond-with-error-flag">respond-with error flag</a>
<li><a href="http://dom.spec.whatwg.org/#concept-throw">Throw</a> a "<code><a href="http://dom.spec.whatwg.org/#networkerror">NetworkError</a></code>" exception.</li>
</ol>
</li>
<li>If <var>r</var> resolves to <var>response</var>, an instance of <code><a href="http://fetch.spec.whatwg.org/#response">Response</a></code> interface, then:
Expand Down

0 comments on commit f60dfca

Please sign in to comment.