URLSearchParams

js.html.URLSearchParams (extern class)

The URLSearchParams interface defines utility methods to work with the query string of a URL.

Documentation URLSearchParams by Mozilla Contributors, licensed under CC-BY-SA 2.5.

See:

Instance Members

append(name: String, value: String): Void

Appends a specified key/value pair as a new search parameter.

Name Type
name String
value String

delete(name: String): Void

Deletes the given search parameter, and its associated value, from the list of all search parameters.

Name Type
name String

get(name: String): String

Returns the first value associated to the given search parameter.

Name Type
name String
Returns
String

getAll(name: String): Array<String>

Returns all the values associated with a given search parameter.

Name Type
name String
Returns
Array<String>

has(name: String): Bool

Returns a Boolean indicating if such a search parameter exists.

Name Type
name String
Returns
Bool

set(name: String, value: String): Void

Sets the value associated to a given search parameter to the given value. If there were several values, delete the others.

Name Type
name String
value String

sort(): Void

Sorts all key/value pairs, if any, by their keys.


Returns an Iteration_protocols allowing to go through all key/value pairs contained in this object.

Returns
URLSearchParamsIterator

Returns an Iteration_protocols allowing to go through all keys of the key/value pairs contained in this object.

Returns
URLSearchParamsIterator

Returns an Iteration_protocols allowing to go through all values of the key/value pairs contained in this object.

Returns
URLSearchParamsIterator

forEach(callback: Dynamic, ?thisArg: Dynamic): Void
Name Type Default
callback Dynamic
thisArg Dynamic (optional)

new(?init: Array<Array<String>>): Void
Name Type Default
init Array<Array<String>> (optional)