diff --git a/doc/api/url.md b/doc/api/url.md index 56fb57aa68858a..c32b65b3f83a2a 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.