From 273830fc8f1cdd477f10e004b4b322d31ea19ee1 Mon Sep 17 00:00:00 2001 From: skyclouds2001 Date: Thu, 14 Nov 2024 11:27:39 +0800 Subject: [PATCH] doc: add doc for PerformanceObserver.takeRecords() --- doc/api/url.md | 75 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 75 insertions(+) diff --git a/doc/api/url.md b/doc/api/url.md index 56fb57aa68858a..96ad388391c06c 100644 --- a/doc/api/url.md +++ b/doc/api/url.md @@ -771,10 +771,22 @@ console.log(myURL.href); #### `new URLSearchParams()` + + Instantiate a new empty `URLSearchParams` object. #### `new URLSearchParams(string)` + + * `string` {string} A query string Parse the `string` as a query string, and use it to instantiate a new @@ -881,6 +893,12 @@ new URLSearchParams([ #### `urlSearchParams.append(name, value)` + + * `name` {string} * `value` {string} @@ -889,6 +907,9 @@ Append a new name-value pair to the query string. #### `urlSearchParams.delete(name[, value])` + * Returns: {Iterator} Returns an ES6 `Iterator` over each of the name-value pairs in the query. @@ -918,6 +945,9 @@ Alias for [`urlSearchParams[@@iterator]()`][`urlSearchParams@@iterator()`]. #### `urlSearchParams.forEach(fn[, thisArg])` + * `name` {string} * Returns: {string | null} A string or `null` if there is no name-value pair with the given `name`. @@ -952,6 +988,12 @@ are no such pairs, `null` is returned. #### `urlSearchParams.getAll(name)` + + * `name` {string} * Returns: {string\[]} @@ -961,6 +1003,9 @@ no such pairs, an empty array is returned. #### `urlSearchParams.has(name[, value])` + * Returns: {Iterator} Returns an ES6 `Iterator` over the names of each name-value pair. @@ -1000,6 +1051,12 @@ for (const name of params.keys()) { #### `urlSearchParams.set(name, value)` + + * `name` {string} * `value` {string} @@ -1055,6 +1112,12 @@ console.log(params.toString()); #### `urlSearchParams.toString()` + + * Returns: {string} Returns the search parameters serialized as a string, with characters @@ -1062,12 +1125,24 @@ percent-encoded where necessary. #### `urlSearchParams.values()` + + * Returns: {Iterator} Returns an ES6 `Iterator` over the values of each name-value pair. #### `urlSearchParams[Symbol.iterator]()` + + * Returns: {Iterator} Returns an ES6 `Iterator` over each of the name-value pairs in the query string.