Skip to content

Commit

Permalink
Allow one URLSearchParams object to be associated with multiple URLs h…
Browse files Browse the repository at this point in the history
  • Loading branch information
annevk committed Jan 30, 2014
1 parent 227400e commit c9904d8
Show file tree
Hide file tree
Showing 2 changed files with 58 additions and 48 deletions.
55 changes: 30 additions & 25 deletions url.html
Expand Up @@ -7,7 +7,7 @@

<p><a class="logo" href="//www.whatwg.org/"><img alt="WHATWG" height="100" src="//resources.whatwg.org/logo-url.svg" width="100"></a></p>
<h1>URL</h1>
<h2 class="no-num no-toc" id="living-standard-—-last-updated-28-january-2014">Living Standard — Last Updated 28 January 2014</h2>
<h2 class="no-num no-toc" id="living-standard-—-last-updated-30-january-2014">Living Standard — Last Updated 30 January 2014</h2>

<dl>
<dt>This Version:
Expand Down Expand Up @@ -35,7 +35,7 @@ <h2 class="no-num no-toc" id="living-standard-—-last-updated-28-january-2014">
<p class="copyright"><a href="http://creativecommons.org/publicdomain/zero/1.0/" rel="license"><img alt="CC0" src="http://i.creativecommons.org/p/zero/1.0/80x15.png"></a>
To the extent possible under law, the editors have waived all copyright and
related or neighboring rights to this work. In addition, as of
28 January 2014, the editors have made this specification available
30 January 2014, the editors have made this specification available
under the
<a href="http://www.openwebfoundation.org/legal/the-owf-1-0-agreements/owfa-1-0" rel="license">Open Web Foundation Agreement Version 1.0</a>,
which is available at
Expand Down Expand Up @@ -2445,8 +2445,8 @@ <h3 id="urlutils-and-urlutilsreadonly-members"><span class="secno">7.3 </span><a
<li><p>If the given value is the empty string, set
<a href="#concept-url-query" title="concept-url-query">query</a> to null, set
<a href="#concept-uu-query-object" title="concept-UU-query-object">query object</a>'s associated list
of name-value pairs to the empty list, run the
<a href="#pre-update-steps">pre-update steps</a>, and terminate these steps.
of name-value pairs to the empty list, run its
<a href="#concept-uq-update" title="concept-UQ-update">update steps</a>, and terminate these steps.

<li><p>Let <var title="">input</var> be the given value with a single leading
"<code title="">?</code>" removed, if any.
Expand All @@ -2464,9 +2464,14 @@ <h3 id="urlutils-and-urlutilsreadonly-members"><span class="secno">7.3 </span><a
<a href="#concept-urlencoded-string-parser" title="concept-urlencoded-string-parser">parsing</a>
<var title="">input</var>.

<li><p>Run the <a href="#pre-update-steps">pre-update steps</a>.
<li><p>Run <a href="#concept-uu-query-object" title="concept-UU-query-object">query object</a>'s
<a href="#concept-uq-update" title="concept-UQ-update">update steps</a>.
</ol>

<p class="note no-backref">The <a href="#concept-uq-update" title="concept-UQ-update">update steps</a> of
<a href="#concept-uu-query-object" title="concept-UU-query-object">query object</a> are run to ensure all
<a href="#concept-uq-url-object" title="concept-UQ-url-object">url objects</a> remain synchronized.

<p>The <dfn id="dom-url-searchparams" title="dom-URL-searchParams"><code>searchParams</code></dfn> attribute must
return the <a href="#concept-uu-query-object" title="concept-UU-query-object">query object</a>.

Expand All @@ -2479,17 +2484,24 @@ <h3 id="urlutils-and-urlutilsreadonly-members"><span class="secno">7.3 </span><a
<li><p>If <a href="#concept-uu-query-object" title="concept-UU-query-object">query object</a> or
<var title="">object</var> is null, terminate these steps.

<li><p>If <var title="">object</var>'s
<a href="#concept-uq-url-object" title="concept-UQ-url-object">url object</a> is not null, set
<var title="">object</var> to a
<a href="#concept-uq-new" title="concept-UQ-new">new <code>URLSearchParams</code> object</a> using
<var title="">object</var>.
<li><p>If <a href="#concept-uu-query-object" title="concept-UU-query-object">query object</a> is non-null, remove
the <a class="external" data-anolis-spec="dom" href="http://dom.spec.whatwg.org/#context-object">context object</a> from
<a href="#concept-uu-query-object" title="concept-UU-query-object">query object</a>'s associated list of
<a href="#concept-uq-url-object" title="concept-UQ-url-object">url objects</a>.

<li><p>Append the <a class="external" data-anolis-spec="dom" href="http://dom.spec.whatwg.org/#context-object">context object</a> to
<var title="">object</var>'s associated list of
<a href="#concept-uq-url-object" title="concept-UQ-url-object">url objects</a>.

<li><p>Set <a href="#concept-uu-query-object" title="concept-UU-query-object">query object</a> to
<var title="">object</var>.

<li><p>Run <var title="">object</var>'s
<a href="#concept-uq-update" title="concept-UQ-update">update steps</a>.
<li><p>Set <a href="#concept-url-query" title="concept-url-query">query</a> to the
<a href="#concept-urlencoded-serializer" title="concept-urlencoded-serializer">serialization</a> of the
<a href="#concept-uu-query-object" title="concept-UU-query-object">query object</a>'s associated list of name-value
pairs.

<li><p>Run the <a href="#pre-update-steps">pre-update steps</a>.
</ol>

<p>The <dfn id="dom-url-hash" title="dom-URL-hash"><code>hash</code></dfn> attribute must run
Expand Down Expand Up @@ -2547,11 +2559,8 @@ <h3 id="interface-urlsearchparams"><span class="secno">7.4 </span>Interface <a h
<p>A <a href="#urlsearchparams"><code>URLSearchParams</code></a> object has an associated list of name-value
pairs, which is initially empty.

<p>A <a href="#urlsearchparams"><code>URLSearchParams</code></a> object has an associated
<dfn id="concept-uq-url-object" title="concept-UQ-url-object">url object</dfn> which is an object
implementing <a href="#urlutils"><code>URLUtils</code></a> whose
<a href="#concept-uu-query-object" title="concept-UU-query-object">query object</a> is the
<a href="#urlsearchparams"><code>URLSearchParams</code></a> object, and null if there is no such object.
<p>A <a href="#urlsearchparams"><code>URLSearchParams</code></a> object has an associated list of zero or more
<dfn id="concept-uq-url-object" title="concept-UQ-url-object">url objects</dfn>.

<p class="note"><a href="#urlsearchparams"><code>URLSearchParams</code></a> objects always use
<a class="external" data-anolis-spec="encoding" href="http://encoding.spec.whatwg.org/#utf-8">utf-8</a> as
Expand Down Expand Up @@ -2586,20 +2595,16 @@ <h3 id="interface-urlsearchparams"><span class="secno">7.4 </span>Interface <a h
</ol>

<p>A <a href="#urlsearchparams"><code>URLSearchParams</code></a> object's
<dfn id="concept-uq-update" title="concept-UQ-update">update steps</dfn> are:
<dfn id="concept-uq-update" title="concept-UQ-update">update steps</dfn> are to run these steps for each associated
<a href="#concept-uq-url-object" title="concept-UQ-url-object">url object</a> <var title="">urlObject</var>, in order:

<ol>
<li><p>If <a href="#concept-uq-url-object" title="concept-UQ-url-object">url object</a> is null,
terminate these steps.

<li><p>Set <a href="#concept-uq-url-object" title="concept-UQ-url-object">url object</a>'s
<a href="#concept-uu-url" title="concept-UU-url">url</a>'s
<li><p>Set <var title="">urlObject</var>'s <a href="#concept-uu-url" title="concept-UU-url">url</a>'s
<a href="#concept-url-query" title="concept-URL-query">query</a> to the
<a href="#concept-urlencoded-serializer" title="concept-urlencoded-serializer">serialization</a> of the
<a href="#urlsearchparams"><code>URLSearchParams</code></a> object's associated list of name-value pairs.

<li><p>Run <a href="#concept-uq-url-object" title="concept-UQ-url-object">url object</a>'s
<a href="#pre-update-steps">pre-update steps</a>.
<li><p>Run <var title="">urlObject</var>'s <a href="#pre-update-steps">pre-update steps</a>.
</ol>

<p>The
Expand Down
51 changes: 28 additions & 23 deletions url.src.html
Expand Up @@ -2415,8 +2415,8 @@ <h3><code>URLUtils</code> and <code>URLUtilsReadOnly</code> members</h3>
<li><p>If the given value is the empty string, set
<span title=concept-url-query>query</span> to null, set
<span title=concept-UU-query-object>query object</span>'s associated list
of name-value pairs to the empty list, run the
<span>pre-update steps</span>, and terminate these steps.
of name-value pairs to the empty list, run its
<span title=concept-UQ-update>update steps</span>, and terminate these steps.

<li><p>Let <var title>input</var> be the given value with a single leading
"<code title>?</code>" removed, if any.
Expand All @@ -2434,9 +2434,14 @@ <h3><code>URLUtils</code> and <code>URLUtilsReadOnly</code> members</h3>
<span title=concept-urlencoded-string-parser>parsing</span>
<var title="">input</var>.

<li><p>Run the <span>pre-update steps</span>.
<li><p>Run <span title=concept-UU-query-object>query object</span>'s
<span title=concept-UQ-update>update steps</span>.
</ol>

<p class="note no-backref">The <span title=concept-UQ-update>update steps</span> of
<span title=concept-UU-query-object>query object</span> are run to ensure all
<span title=concept-UQ-url-object>url objects</span> remain synchronized.

<p>The <dfn title=dom-URL-searchParams><code>searchParams</code></dfn> attribute must
return the <span title=concept-UU-query-object>query object</span>.

Expand All @@ -2449,17 +2454,24 @@ <h3><code>URLUtils</code> and <code>URLUtilsReadOnly</code> members</h3>
<li><p>If <span title=concept-UU-query-object>query object</span> or
<var title>object</var> is null, terminate these steps.

<li><p>If <var title>object</var>'s
<span title=concept-UQ-url-object>url object</span> is not null, set
<var title>object</var> to a
<span title=concept-UQ-new>new <code>URLSearchParams</code> object</span> using
<var title>object</var>.
<li><p>If <span title=concept-UU-query-object>query object</span> is non-null, remove
the <span data-anolis-spec=dom>context object</span> from
<span title=concept-UU-query-object>query object</span>'s associated list of
<span title=concept-UQ-url-object>url objects</span>.

<li><p>Append the <span data-anolis-spec=dom>context object</span> to
<var title>object</var>'s associated list of
<span title=concept-UQ-url-object>url objects</span>.

<li><p>Set <span title=concept-UU-query-object>query object</span> to
<var title>object</var>.

<li><p>Run <var title>object</var>'s
<span title=concept-UQ-update>update steps</span>.
<li><p>Set <span title=concept-url-query>query</span> to the
<span title=concept-urlencoded-serializer>serialization</span> of the
<span title=concept-UU-query-object>query object</span>'s associated list of name-value
pairs.

<li><p>Run the <span>pre-update steps</span>.
</ol>

<p>The <dfn title=dom-URL-hash><code>hash</code></dfn> attribute must run
Expand Down Expand Up @@ -2517,11 +2529,8 @@ <h3>Interface <code>URLSearchParams</code></h3>
<p>A <code>URLSearchParams</code> object has an associated list of name-value
pairs, which is initially empty.

<p>A <code>URLSearchParams</code> object has an associated
<dfn title=concept-UQ-url-object>url object</dfn> which is an object
implementing <code>URLUtils</code> whose
<span title=concept-UU-query-object>query object</span> is the
<code>URLSearchParams</code> object, and null if there is no such object.
<p>A <code>URLSearchParams</code> object has an associated list of zero or more
<dfn title=concept-UQ-url-object>url objects</dfn>.

<p class=note><code>URLSearchParams</code> objects always use
<span data-anolis-spec=encoding>utf-8</span> as
Expand Down Expand Up @@ -2556,20 +2565,16 @@ <h3>Interface <code>URLSearchParams</code></h3>
</ol>

<p>A <code>URLSearchParams</code> object's
<dfn title=concept-UQ-update>update steps</dfn> are:
<dfn title=concept-UQ-update>update steps</dfn> are to run these steps for each associated
<span title=concept-UQ-url-object>url object</span> <var title>urlObject</var>, in order:

<ol>
<li><p>If <span title=concept-UQ-url-object>url object</span> is null,
terminate these steps.

<li><p>Set <span title=concept-UQ-url-object>url object</span>'s
<span title=concept-UU-url>url</span>'s
<li><p>Set <var title>urlObject</var>'s <span title=concept-UU-url>url</span>'s
<span title=concept-URL-query>query</span> to the
<span title=concept-urlencoded-serializer>serialization</span> of the
<code>URLSearchParams</code> object's associated list of name-value pairs.

<li><p>Run <span title=concept-UQ-url-object>url object</span>'s
<span>pre-update steps</span>.
<li><p>Run <var title>urlObject</var>'s <span>pre-update steps</span>.
</ol>

<p>The
Expand Down

0 comments on commit c9904d8

Please sign in to comment.