@@ -368,8 +368,8 @@ class URLSearchParams {
368368 // Append (innerSequence[0], innerSequence[1]) to querys list.
369369 ArrayPrototypePush (
370370 this . #searchParams,
371- StringPrototypeToWellFormed ( pair [ 0 ] ) ,
372- StringPrototypeToWellFormed ( pair [ 1 ] ) ,
371+ StringPrototypeToWellFormed ( ` ${ pair [ 0 ] } ` ) ,
372+ StringPrototypeToWellFormed ( ` ${ pair [ 1 ] } ` ) ,
373373 ) ;
374374 } else {
375375 if ( ( ( typeof pair !== 'object' && typeof pair !== 'function' ) ||
@@ -381,7 +381,7 @@ class URLSearchParams {
381381
382382 for ( const element of pair ) {
383383 length ++ ;
384- ArrayPrototypePush ( this . #searchParams, StringPrototypeToWellFormed ( element ) ) ;
384+ ArrayPrototypePush ( this . #searchParams, StringPrototypeToWellFormed ( ` ${ element } ` ) ) ;
385385 }
386386
387387 // If innerSequence's size is not 2, then throw a TypeError.
@@ -400,7 +400,7 @@ class URLSearchParams {
400400 const desc = ReflectGetOwnPropertyDescriptor ( init , key ) ;
401401 if ( desc !== undefined && desc . enumerable ) {
402402 const typedKey = StringPrototypeToWellFormed ( key ) ;
403- const typedValue = StringPrototypeToWellFormed ( init [ key ] ) ;
403+ const typedValue = StringPrototypeToWellFormed ( ` ${ init [ key ] } ` ) ;
404404
405405 // Two different keys may become the same USVString after normalization.
406406 // In that case, we retain the later one. Refer to WPT.
@@ -417,7 +417,7 @@ class URLSearchParams {
417417 }
418418 } else {
419419 // https://url.spec.whatwg.org/#dom-urlsearchparams-urlsearchparams
420- init = StringPrototypeToWellFormed ( init ) ;
420+ init = StringPrototypeToWellFormed ( ` ${ init } ` ) ;
421421 this . #searchParams = init ? parseParams ( init ) : [ ] ;
422422 }
423423 }
@@ -472,8 +472,8 @@ class URLSearchParams {
472472 throw new ERR_MISSING_ARGS ( 'name' , 'value' ) ;
473473 }
474474
475- name = StringPrototypeToWellFormed ( name ) ;
476- value = StringPrototypeToWellFormed ( value ) ;
475+ name = StringPrototypeToWellFormed ( ` ${ name } ` ) ;
476+ value = StringPrototypeToWellFormed ( ` ${ value } ` ) ;
477477 ArrayPrototypePush ( this . #searchParams, name , value ) ;
478478 if ( this . #context) {
479479 this . #context. search = this . toString ( ) ;
@@ -489,10 +489,10 @@ class URLSearchParams {
489489 }
490490
491491 const list = this . #searchParams;
492- name = StringPrototypeToWellFormed ( name ) ;
492+ name = StringPrototypeToWellFormed ( ` ${ name } ` ) ;
493493
494494 if ( value !== undefined ) {
495- value = StringPrototypeToWellFormed ( value ) ;
495+ value = StringPrototypeToWellFormed ( ` ${ value } ` ) ;
496496 for ( let i = 0 ; i < list . length ; ) {
497497 if ( list [ i ] === name && list [ i + 1 ] === value ) {
498498 list . splice ( i , 2 ) ;
@@ -523,7 +523,7 @@ class URLSearchParams {
523523 }
524524
525525 const list = this . #searchParams;
526- name = StringPrototypeToWellFormed ( name ) ;
526+ name = StringPrototypeToWellFormed ( ` ${ name } ` ) ;
527527 for ( let i = 0 ; i < list . length ; i += 2 ) {
528528 if ( list [ i ] === name ) {
529529 return list [ i + 1 ] ;
@@ -542,7 +542,7 @@ class URLSearchParams {
542542
543543 const list = this . #searchParams;
544544 const values = [ ] ;
545- name = StringPrototypeToWellFormed ( name ) ;
545+ name = StringPrototypeToWellFormed ( ` ${ name } ` ) ;
546546 for ( let i = 0 ; i < list . length ; i += 2 ) {
547547 if ( list [ i ] === name ) {
548548 values . push ( list [ i + 1 ] ) ;
@@ -560,10 +560,10 @@ class URLSearchParams {
560560 }
561561
562562 const list = this . #searchParams;
563- name = StringPrototypeToWellFormed ( name ) ;
563+ name = StringPrototypeToWellFormed ( ` ${ name } ` ) ;
564564
565565 if ( value !== undefined ) {
566- value = StringPrototypeToWellFormed ( value ) ;
566+ value = StringPrototypeToWellFormed ( ` ${ value } ` ) ;
567567 }
568568
569569 for ( let i = 0 ; i < list . length ; i += 2 ) {
@@ -586,8 +586,8 @@ class URLSearchParams {
586586 }
587587
588588 const list = this . #searchParams;
589- name = StringPrototypeToWellFormed ( name ) ;
590- value = StringPrototypeToWellFormed ( value ) ;
589+ name = StringPrototypeToWellFormed ( ` ${ name } ` ) ;
590+ value = StringPrototypeToWellFormed ( ` ${ value } ` ) ;
591591
592592 // If there are any name-value pairs whose name is `name`, in `list`, set
593593 // the value of the first such name-value pair to `value` and remove the
@@ -1010,7 +1010,7 @@ class URL {
10101010 }
10111011
10121012 set search ( value ) {
1013- const href = bindingUrl . update ( this . #context. href , updateActions . kSearch , StringPrototypeToWellFormed ( value ) ) ;
1013+ const href = bindingUrl . update ( this . #context. href , updateActions . kSearch , StringPrototypeToWellFormed ( ` ${ value } ` ) ) ;
10141014 if ( href ) {
10151015 this . #updateContext( href ) ;
10161016 }
0 commit comments