new Location()
A collection of useful static methods to deal with JavaScript window.location object.
- Since:
-
- 1.0.0
- Deprecated:
-
- since 3.6.5, use
mindsmine.URL.*
functions instead. Will be removed in next major release.
- since 3.6.5, use
Methods
-
<static> getAllHashParameters()
-
Returns an object containing the names of the hash parameters as properties and values of the hash parameters as the property values.
If a hash parameter does not have an associated value, it is provided with a
true
value.- Since:
-
- 2.0.0
- Deprecated:
-
- since 3.6.5, use
mindsmine.URL.getAllHashParameters(window.location)
function instead. Will be removed in next major release.
- since 3.6.5, use
Returns:
Returns
null
if no hash parameters exist.- Type
- Object | null
-
<static> getAllQueryParameters()
-
Returns an object containing the names of the search parameters as properties and values of the search parameters as the property values.
- Since:
-
- 2.0.0
- Deprecated:
-
- since 3.6.5, use
mindsmine.URL.getAllQueryParameters(window.location)
function instead. Will be removed in next major release.
- since 3.6.5, use
Returns:
Returns
null
if no search parameters exist.- Type
- Object | null
-
<static> getHashParameter(hashParam)
-
Retrieves the value of the hash parameter.
Parameters:
Name Type Description hashParam
String The hash parameter (case-sensitive) string whose value is to be retrieved.
- Since:
-
- 1.0.0
- Deprecated:
-
- since 3.6.5, use
mindsmine.URL.getHashParameter(window.location, hashParam)
function instead. Will be removed in next major release.
- since 3.6.5, use
Throws:
-
If invalid argument
- Type
- TypeError
Returns:
Returns
null
if unavailable.- Type
- String | null
-
<static> getQueryParameter(queryParam)
-
Retrieves the value of the query parameter.
Parameters:
Name Type Description queryParam
String The query parameter (case-sensitive) string whose value is to be retrieved.
- Since:
-
- 1.0.0
- Deprecated:
-
- since 3.6.5, use
mindsmine.URL.getQueryParameter(window.location, queryParam)
function instead. Will be removed in next major release.
- since 3.6.5, use
Throws:
-
If invalid argument
- Type
- TypeError
Returns:
Returns
null
if unavailable.- Type
- String | null