public static class Window.Location extends Object
Location
is a very simple wrapper, so not all browser
quirks are hidden from the user.Modifier and Type | Method and Description |
---|---|
static void |
assign(String newURL)
Assigns the window to a new URL.
|
static UrlBuilder |
createUrlBuilder()
Create a
UrlBuilder based on this Window.Location . |
static String |
getHash()
Gets the string to the right of the URL's hash.
|
static String |
getHost()
Gets the URL's host and port name.
|
static String |
getHostName()
Gets the URL's host name.
|
static String |
getHref()
Gets the entire URL.
|
static String |
getParameter(String name)
Gets the URL's parameter of the specified name.
|
static Map<String,List<String>> |
getParameterMap()
Returns an immutable Map of the URL query parameters for the host page
at the time this method was called.
|
static String |
getPath()
Gets the path to the URL.
|
static String |
getPort()
Gets the URL's port.
|
static String |
getProtocol()
Gets the URL's protocol.
|
static String |
getQueryString()
Gets the URL's query string.
|
static void |
reload()
Reloads the current browser window.
|
static void |
replace(String newURL)
Replaces the current URL with a new one.
|
public static void assign(String newURL)
newURL
- the new URLpublic static UrlBuilder createUrlBuilder()
UrlBuilder
based on this Window.Location
.public static String getHash()
public static String getHost()
public static String getHostName()
public static String getHref()
public static String getParameter(String name)
name
- the name of the URL's parameterpublic static Map<String,List<String>> getParameterMap()
public static String getPath()
public static String getPort()
public static String getProtocol()
public static String getQueryString()
public static void reload()
public static void replace(String newURL)
newURL
- the new URLCopyright © 2018. All rights reserved.