From d6c309d1472c2edd19ee1f0e776d04ab8b5ba779 Mon Sep 17 00:00:00 2001 From: Bob Put Date: Sun, 24 May 2026 16:24:23 -0400 Subject: [PATCH] doc: add URLSearchParams history data --- doc/api/url.md | 32 +++++++++++++++++++++++++++----- 1 file changed, 27 insertions(+), 5 deletions(-) diff --git a/doc/api/url.md b/doc/api/url.md index d5dc06055b6cc3..16b9962220ed40 100644 --- a/doc/api/url.md +++ b/doc/api/url.md @@ -545,6 +545,16 @@ and [`url.format()`][] methods would produce. #### `url.searchParams` + + * Type: {URLSearchParams} Gets the [`URLSearchParams`][] object representing the query parameters of the @@ -859,7 +869,7 @@ changes: The `URLSearchParams` API provides read and write access to the query of a `URL`. The `URLSearchParams` class can also be used standalone with one of the -four following constructors. +five following constructors. The `URLSearchParams` class is also available on the global object. The WHATWG `URLSearchParams` interface and the [`querystring`][] module have @@ -925,6 +935,19 @@ console.log(params.toString()); // Prints 'user=abc&query=xyz' ``` +#### `new URLSearchParams(urlSearchParams)` + + + +* `urlSearchParams` {URLSearchParams} A `URLSearchParams` object + +Instantiate a new `URLSearchParams` object with search parameters cloned from +the provided `urlSearchParams` object. + #### `new URLSearchParams(obj)`