@@ -3700,10 +3700,10 @@ interface URLSearchParams {
3700
3700
readonly attribute unsigned long size;
3701
3701
3702
3702
undefined append(USVString name, USVString value);
3703
- undefined delete(USVString name);
3703
+ undefined delete(USVString name, optional USVString value );
3704
3704
USVString? get(USVString name);
3705
3705
sequence<USVString> getAll(USVString name);
3706
- boolean has(USVString name);
3706
+ boolean has(USVString name, optional USVString value );
3707
3707
undefined set(USVString name, USVString value);
3708
3708
3709
3709
undefined sort();
@@ -3761,8 +3761,9 @@ console.log(url.searchParams.get('b')); // "~"</code></pre>
3761
3761
the potential to change that object's <a for=url>path</a> in a manner equivalent to the {{URL}}
3762
3762
object's {{URL/search}} and {{URL/hash}} setters.
3763
3763
3764
+ <div algorithm>
3764
3765
<p> To <dfn for=URLSearchParams oldids=concept-urlsearchparams-new>initialize</dfn> a
3765
- {{URLSearchParams}} object <var> query</var> with <var> init</var> , run these steps :
3766
+ {{URLSearchParams}} object <var> query</var> with <var> init</var> :
3766
3767
3767
3768
<ol>
3768
3769
<li>
@@ -3791,9 +3792,11 @@ object's {{URL/search}} and {{URL/hash}} setters.
3791
3792
<a lt="urlencoded string parser">parsing</a> <var> init</var> .
3792
3793
</ol>
3793
3794
</ol>
3795
+ </div>
3794
3796
3797
+ <div algorithm>
3795
3798
<p> To <dfn for=URLSearchParams id=concept-urlsearchparams-update>update</dfn> a {{URLSearchParams}}
3796
- object <var> query</var> , run these steps :
3799
+ object <var> query</var> :
3797
3800
3798
3801
<ol>
3799
3802
<li><p> If <var> query</var> 's <a for=URLSearchParams>URL object</a> is null, then return.
@@ -3811,7 +3814,9 @@ object <var>query</var>, run these steps:
3811
3814
<a>potentially strip trailing spaces from an opaque path</a> with <var> query</var> 's
3812
3815
<a for=URLSearchParams>URL object</a> .
3813
3816
</ol>
3817
+ </div>
3814
3818
3819
+ <div algorithm>
3815
3820
<p> The
3816
3821
<dfn constructor for=URLSearchParams lt="URLSearchParams(init)"><code>new URLSearchParams(<var>init</var>)</code></dfn>
3817
3822
constructor steps are:</p>
@@ -3822,10 +3827,14 @@ constructor steps are:</p>
3822
3827
3823
3828
<li><p> <a for=URLSearchParams>Initialize</a> <a>this</a> with <var> init</var> .
3824
3829
</ol>
3830
+ </div>
3825
3831
3832
+ <div algorithm>
3826
3833
<p> The <dfn attribute for=URLSearchParams><code>size</code></dfn> getter steps are to return
3827
3834
<a>this</a> 's <a for=URLSearchParams>list</a>' s <a for=list>size</a> .
3835
+ </div>
3828
3836
3837
+ <div algorithm>
3829
3838
<p> The <dfn method for=URLSearchParams><code>append(<var>name</var>, <var>value</var>)</code></dfn>
3830
3839
method steps are:
3831
3840
@@ -3835,28 +3844,52 @@ method steps are:
3835
3844
3836
3845
<li><p> <a for=URLSearchParams>Update</a> <a>this</a> .
3837
3846
</ol>
3847
+ </div>
3838
3848
3839
- <p> The <dfn method for=URLSearchParams><code>delete(<var>name</var>)</code></dfn> method steps are:
3849
+ <div algorithm>
3850
+ <p> The <dfn method for=URLSearchParams><code>delete(<var>name</var>, <var>value</var>)</code></dfn>
3851
+ method steps are:
3840
3852
3841
3853
<ol>
3842
- <li><p> <a for=list>Remove</a> all <a for=/>tuples</a> whose name is <var> name</var> from
3854
+ <li><p> If <var> value</var> is given, then <a for=list>remove</a> all <a for=/>tuples</a> whose name
3855
+ is <var> name</var> and value is <var> value</var> from <a>this</a> 's
3856
+ <a for=URLSearchParams>list</a> .
3857
+
3858
+ <li><p> Otherwise, <a for=list>remove</a> all <a for=/>tuples</a> whose name is <var> name</var> from
3843
3859
<a>this</a> 's <a for=URLSearchParams>list</a> .
3844
3860
3845
3861
<li><p> <a for=URLSearchParams>Update</a> <a>this</a> .
3846
3862
</ol>
3863
+ </div>
3847
3864
3865
+ <div algorithm>
3848
3866
<p> The <dfn method for=URLSearchParams><code>get(<var>name</var>)</code></dfn> method steps are to
3849
3867
return the value of the first <a for=/>tuple</a> whose name is <var> name</var> in <a>this</a> 's
3850
3868
<a for=URLSearchParams>list</a> , if there is such a <a for=/>tuple</a> ; otherwise null.
3869
+ </div>
3851
3870
3871
+ <div algorithm>
3852
3872
<p> The <dfn method for=URLSearchParams><code>getAll(<var>name</var>)</code></dfn> method steps are
3853
3873
to return the values of all <a for=/>tuples</a> whose name is <var> name</var> in <a>this</a> 's
3854
3874
<a for=URLSearchParams>list</a> , in list order; otherwise the empty sequence.
3875
+ </div>
3876
+
3877
+ <div algorithm>
3878
+ <p> The <dfn method for=URLSearchParams><code>has(<var>name</var>, <var>value</var>)</code></dfn>
3879
+ method steps are:
3880
+
3881
+ <ol>
3882
+ <li><p> If <var> value</var> is given and there is a <a for=/>tuple</a> whose name is <var> name</var>
3883
+ and value is <var> value</var> in <a>this</a> 's <a for=URLSearchParams>list</a> , then return true.
3855
3884
3856
- <p> The <dfn method for=URLSearchParams><code>has(<var>name</var>)</code></dfn> method steps are to
3857
- return true if there is a <a for=/>tuple</a> whose name is <var> name</var> in <a>this</a> 's
3858
- <a for=URLSearchParams>list</a> ; otherwise false.
3885
+ <li><p> If <var> value</var> is not given and there is a <a for=/>tuple</a> whose name is
3886
+ <var> name</var> in <a>this</a> 's <a for=URLSearchParams>list</a> , then return true.
3859
3887
3888
+ <li><p> Return false.
3889
+ </ol>
3890
+ </div>
3891
+
3892
+ <div algorithm>
3860
3893
<p> The <dfn method for=URLSearchParams><code>set(<var>name</var>, <var>value</var>)</code></dfn>
3861
3894
method steps are:
3862
3895
@@ -3870,6 +3903,7 @@ method steps are:
3870
3903
3871
3904
<li><p> <a for=URLSearchParams>Update</a> <a>this</a> .
3872
3905
</ol>
3906
+ </div>
3873
3907
3874
3908
<hr>
3875
3909
@@ -3891,6 +3925,7 @@ const sorted = new URLSearchParams(url.search)
3891
3925
sorted.sort()</code></pre>
3892
3926
</div>
3893
3927
3928
+ <div algorithm>
3894
3929
<p> The <dfn method for=URLSearchParams><code>sort()</code></dfn> method steps are:
3895
3930
3896
3931
<ol>
@@ -3900,6 +3935,7 @@ sorted.sort()</code></pre>
3900
3935
3901
3936
<li><p> <a for=URLSearchParams>Update</a> <a>this</a> .
3902
3937
</ol>
3938
+ </div>
3903
3939
3904
3940
<hr>
3905
3941
@@ -3954,6 +3990,7 @@ Bobby Holley,
3954
3990
Boris Zbarsky,
3955
3991
Brad Hill,
3956
3992
Brandon Ross,
3993
+ Cailyn Hansen,
3957
3994
Chris Dumez,
3958
3995
Chris Rebert,
3959
3996
Corey Farwell,
0 commit comments