Skip to content

Commit

Permalink
Use URL records instead of URL strings for the internal algorithm. Fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
jungkees committed Aug 26, 2015
1 parent 09a01e3 commit b1538d9
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions spec/service_worker/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -2418,8 +2418,8 @@ <h1>Register</h1>
<dl>
<dt>Input</dt>
<dd><var>client</var>, a <a href="#dfn-service-worker-client">service worker client</a></dd>
<dd><var>scriptURL</var>, an <a href="https://url.spec.whatwg.org/#concept-absolute-url">absolute URL</a></dd>
<dd><var>scopeURL</var>, an <a href="https://url.spec.whatwg.org/#concept-absolute-url">absolute URL</a></dd>
<dd><var>scriptURL</var>, a <a href="https://url.spec.whatwg.org/#concept-url">URL</a></dd>
<dd><var>scopeURL</var>, a <a href="https://url.spec.whatwg.org/#concept-url">URL</a></dd>
<dt>Output</dt>
<dd><var>promise</var>, a <a href="http://www.ecma-international.org/ecma-262/6.0/#sec-promise-objects">promise</a></dd>
</dl>
Expand Down Expand Up @@ -3189,7 +3189,7 @@ <h1>Unregister</h1>
<dl>
<dt>Input</dt>
<dd><var>client</var>, a <a href="#dfn-service-worker-client">service worker client</a></dd>
<dd><var>scope</var>, an <a href="https://url.spec.whatwg.org/#concept-absolute-url">absolute URL</a></dd>
<dd><var>scope</var>, a <a href="https://url.spec.whatwg.org/#concept-url">URL</a></dd>
<dt>Output</dt>
<dd><var>promise</var>, a <a href="http://www.ecma-international.org/ecma-262/6.0/#sec-promise-objects">promise</a></dd>
</dl>
Expand Down Expand Up @@ -3235,7 +3235,7 @@ <h1>Set Registration</h1>
<spec-algorithm>
<dl>
<dt>Input</dt>
<dd><var>scope</var>, an <a href="https://url.spec.whatwg.org/#concept-absolute-url">absolute URL</a></dd>
<dd><var>scope</var>, a <a href="https://url.spec.whatwg.org/#concept-url">URL</a></dd>
<dt>Output</dt>
<dd><var>registration</var>, a <a href="#dfn-service-worker-registration">service worker registration</a></dd>
</dl>
Expand Down Expand Up @@ -3285,7 +3285,7 @@ <h1>Clear Registration</h1>
<li>The user agent <em class="rfc2119" title="MAY">may</em> abort in-flight requests triggered by <var>registration</var>'s <a href="#dfn-active-worker">active worker</a>.</li>
</ol>
</li>
<li>Delete a <a href="http://www.ecma-international.org/ecma-262/6.0/#sec-list-and-record-specification-type">Record</a> {[[key]], [[value]]} <var>entry</var> of its <a href="#dfn-scope-to-registration-map">scope to registration map</a> where <var>registration</var>'s <a href="#dfn-scope-url">scope url</a> matches <var>entry</var>.[[key]].</li>
<li>Delete a <a href="http://www.ecma-international.org/ecma-262/6.0/#sec-list-and-record-specification-type">Record</a> {[[key]], [[value]]} <var>entry</var> of its <a href="#dfn-scope-to-registration-map">scope to registration map</a> where <var>registration</var>'s <a href="#dfn-scope-url">scope url</a> is the result of <a href="https://url.spec.whatwg.org/#concept-url-parser">parsing</a> <var>entry</var>.[[key]].</li>
</ol>
</spec-algorithm>
</spec-section>
Expand Down Expand Up @@ -3338,16 +3338,16 @@ <h1>Match Service Worker Registration</h1>
<spec-algorithm>
<dl>
<dt>Input</dt>
<dd><var>clientURL</var>, an <a href="https://url.spec.whatwg.org/#concept-absolute-url">absolute URL</a></dd>
<dd><var>clientURL</var>, a <a href="https://url.spec.whatwg.org/#concept-url">URL</a></dd>
<dt>Output</dt>
<dd><var>registration</var>, a <a href="#dfn-service-worker-registration">service worker registration</a></dd>
</dl>
<ol>
<li>Run the following steps atomically.</li>
<li>Let <var>clientURLString</var> be <a href="https://url.spec.whatwg.org/#concept-url-serializer">serialized</a> <var>clientURL</var>.</li>
<li>Let <var>matchingScope</var> be the longest [[key]] in <a href="#dfn-scope-to-registration-map">scope to registration map</a> starting with the value of <var>clientURLString</var>.</li>
<li>Let <var>matchingScopeURL</var> be the result of <a href="https://url.spec.whatwg.org/#concept-url-parser">parsing</a> <var>matchingScope</var>.</li>
<li>Let <var>registration</var> be the result of running <a href="#get-registration-algorithm">Get Registration</a> algorithm passing <var>matchingScopeURL</var> as the argument.</li>
<li>Let <var>parsedMatchingScope</var> be the result of <a href="https://url.spec.whatwg.org/#concept-url-parser">parsing</a> <var>matchingScope</var>.</li>
<li>Let <var>registration</var> be the result of running <a href="#get-registration-algorithm">Get Registration</a> algorithm passing <var>parsedMatchingScope</var> as the argument.</li>
<li>If <var>registration</var> is not null and <var>registration</var>'s <a href="#dfn-uninstalling-flag">uninstalling flag</a> is set, then:
<ol>
<li>Return null.</li>
Expand All @@ -3364,7 +3364,7 @@ <h1>Get Registration</h1>
<spec-algorithm>
<dl>
<dt>Input</dt>
<dd><var>scope</var>, an <a href="https://url.spec.whatwg.org/#concept-absolute-url">absolute URL</a></dd>
<dd><var>scope</var>, a <a href="https://url.spec.whatwg.org/#concept-url">URL</a></dd>
<dt>Output</dt>
<dd><var>registration</var>, a <a href="#dfn-service-worker-registration">service worker registration</a></dd>
</dl>
Expand Down

0 comments on commit b1538d9

Please sign in to comment.