|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.sourceforge.htmlunit.corejs.javascript.ScriptableObject
com.gargoylesoftware.htmlunit.javascript.SimpleScriptable
com.gargoylesoftware.htmlunit.javascript.host.Location
public class Location
A JavaScript object for a Location.
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface java.util.Map |
---|
Map.Entry<K,V> |
Field Summary |
---|
Fields inherited from class net.sourceforge.htmlunit.corejs.javascript.ScriptableObject |
---|
CONST, DONTENUM, EMPTY, PERMANENT, READONLY, UNINITIALIZED_CONST |
Fields inherited from interface net.sourceforge.htmlunit.corejs.javascript.Scriptable |
---|
NOT_FOUND |
Constructor Summary | |
---|---|
Location()
Creates an instance. |
Method Summary | |
---|---|
Object |
getDefaultValue(Class<?> hint)
Returns the JavaScript default value of this object. |
void |
initialize(Window window)
Initializes the object. |
void |
jsxFunction_assign(String url)
Loads the new HTML document corresponding to the specified URL. |
void |
jsxFunction_reload(boolean force)
Reloads the current page, possibly forcing retrieval from the server even if the browser cache contains the latest version of the document. |
void |
jsxFunction_replace(String url)
Reloads the window using the specified URL via a postponed action. |
String |
jsxFunction_toString()
Returns the location URL. |
String |
jsxGet_hash()
Returns the hash portion of the location URL (the portion following the '#'). |
String |
jsxGet_host()
Returns the host portion of the location URL (the '[hostname]:[port]' portion). |
String |
jsxGet_hostname()
Returns the hostname portion of the location URL. |
String |
jsxGet_href()
Returns the location URL. |
String |
jsxGet_pathname()
Returns the pathname portion of the location URL. |
String |
jsxGet_port()
Returns the port portion of the location URL. |
String |
jsxGet_protocol()
Returns the protocol portion of the location URL, including the trailing ':'. |
String |
jsxGet_search()
Returns the search portion of the location URL (the portion following the '?'). |
void |
jsxSet_hash(String hash)
Sets the hash portion of the location URL (the portion following the '#'). |
void |
jsxSet_host(String host)
Sets the host portion of the location URL (the '[hostname]:[port]' portion). |
void |
jsxSet_hostname(String hostname)
Sets the hostname portion of the location URL. |
void |
jsxSet_href(String newLocation)
Sets the location URL to an entirely new value. |
void |
jsxSet_pathname(String pathname)
Sets the pathname portion of the location URL. |
void |
jsxSet_port(String port)
Sets the port portion of the location URL. |
void |
jsxSet_protocol(String protocol)
Sets the protocol portion of the location URL. |
void |
jsxSet_search(String search)
Sets the search portion of the location URL (the portion following the '?'). |
String |
toString()
Returns the string value of the location, which is the full URL string. |
Methods inherited from class com.gargoylesoftware.htmlunit.javascript.SimpleScriptable |
---|
clone, defineFunctionProperties, defineProperty, equivalentValues, get, getBrowserVersion, getClassName, getDomNodeOrDie, getDomNodeOrNull, getPrototype, getScriptableFor, getStartingScope, getTransformerScriptableFor, getWindow, getWindow, getWithPreemption, hasInstance, initParentScope, makeScriptableFor, setCaseSensitive, setDomNode, setDomNode, setHtmlElement |
Methods inherited from class net.sourceforge.htmlunit.corejs.javascript.ScriptableObject |
---|
applyDescriptorToAttributeBitset, associateValue, avoidObjectDetection, buildDataDescriptor, callMethod, callMethod, clear, containsKey, containsValue, defineClass, defineClass, defineClass, defineConst, defineConstProperty, defineOwnProperties, defineOwnProperty, defineProperty, defineProperty, defineProperty, delete, delete, deleteProperty, deleteProperty, ensureScriptable, ensureScriptableObject, entrySet, get, get, getAllIds, getArrayPrototype, getAssociatedValue, getAttributes, getAttributes, getAttributes, getAttributes, getClassPrototype, getDefaultValue, getFunctionPrototype, getGetterOrSetter, getIds, getObjectPrototype, getOwnPropertyDescriptor, getParentScope, getProperty, getProperty, getPropertyIds, getPrototype, getSlot, getTopLevelScope, getTopScopeValue, getTypeOf, has, has, hasProperty, hasProperty, isAccessorDescriptor, isConst, isDataDescriptor, isEmpty, isExtensible, isFalse, isGenericDescriptor, isGetterOrSetter, isSealed, isTrue, keySet, preventExtensions, put, put, put, putAll, putConst, putConstProperty, putProperty, putProperty, redefineProperty, remove, sealObject, setAttributes, setAttributes, setAttributes, setAttributes, setGetterOrSetter, setParentScope, setPrototype, size, values |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface java.util.Map |
---|
equals, hashCode |
Constructor Detail |
---|
public Location()
Method Detail |
---|
public void initialize(Window window)
window
- the window that this location belongs topublic Object getDefaultValue(Class<?> hint)
getDefaultValue
in interface net.sourceforge.htmlunit.corejs.javascript.Scriptable
getDefaultValue
in class SimpleScriptable
hint
- a hint as to the format of the default value (ignored in this case)
public String toString()
toString
in class Object
public void jsxFunction_assign(String url) throws IOException
url
- the location of the new HTML document to load
IOException
- if loading the specified location failspublic void jsxFunction_reload(boolean force) throws IOException
force
- if true, force reload from server; otherwise, may reload from cache
IOException
- if there is a problem reloading the pagepublic void jsxFunction_replace(String url) throws IOException
url
- the new URL to use to reload the window
IOException
- if loading the specified location failspublic String jsxFunction_toString()
public String jsxGet_href()
public void jsxSet_href(String newLocation) throws IOException
newLocation
- the new location URL
IOException
- if loading the specified location failspublic String jsxGet_search()
public void jsxSet_search(String search) throws Exception
search
- the new search portion of the location URL
Exception
- if an error occurspublic String jsxGet_hash()
public void jsxSet_hash(String hash)
hash
- the new hash portion of the location URLpublic String jsxGet_hostname()
public void jsxSet_hostname(String hostname) throws Exception
hostname
- the new hostname portion of the location URL
Exception
- if an error occurspublic String jsxGet_host()
public void jsxSet_host(String host) throws Exception
host
- the new host portion of the location URL
Exception
- if an error occurspublic String jsxGet_pathname()
public void jsxSet_pathname(String pathname) throws Exception
pathname
- the new pathname portion of the location URL
Exception
- if an error occurspublic String jsxGet_port()
public void jsxSet_port(String port) throws Exception
port
- the new port portion of the location URL
Exception
- if an error occurspublic String jsxGet_protocol()
public void jsxSet_protocol(String protocol) throws Exception
protocol
- the new protocol portion of the location URL
Exception
- if an error occurs
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |