com.gargoylesoftware.htmlunit.javascript.host
Class Anchor

java.lang.Object
  extended by org.mozilla.javascript.ScriptableObject
      extended by com.gargoylesoftware.htmlunit.javascript.SimpleScriptable
          extended by com.gargoylesoftware.htmlunit.javascript.host.NodeImpl
              extended by com.gargoylesoftware.htmlunit.javascript.host.HTMLElement
                  extended by com.gargoylesoftware.htmlunit.javascript.host.FocusableHostElement
                      extended by com.gargoylesoftware.htmlunit.javascript.host.Anchor
All Implemented Interfaces:
ScriptableWithFallbackGetter, java.io.Serializable, org.mozilla.javascript.ConstProperties, org.mozilla.javascript.debug.DebuggableObject, org.mozilla.javascript.Scriptable

public class Anchor
extends FocusableHostElement

The javascript object that represents an anchor

Version:
$Revision: 1.3 $
Author:
Mike Bowler, Alexei Goussev, David D. Kilzer, Marc Guillemot, Chris Erskine
See Also:
Serialized Form

Field Summary
 
Fields inherited from class org.mozilla.javascript.ScriptableObject
CONST, DONTENUM, EMPTY, PERMANENT, READONLY, UNINITIALIZED_CONST
 
Fields inherited from interface org.mozilla.javascript.Scriptable
NOT_FOUND
 
Constructor Summary
Anchor()
 Create an instance.
 
Method Summary
 java.lang.Object getDefaultValue(java.lang.Class hint)
 Calls for instance for implicit conversion to string
 void jsConstructor()
 Javascript constructor.
 java.lang.String jsxGet_hash()
 Returns the hash portion of the link's URL (the portion following the '#').
 java.lang.String jsxGet_host()
 Returns the host portion of the link's URL (the '[hostname]:[port]' portion).
 java.lang.String jsxGet_hostname()
 Returns the hostname portion of the link's URL.
 java.lang.String jsxGet_href()
 Return the value of the href property of this link.
 java.lang.String jsxGet_name()
 Return the value of the name property of this link.
 java.lang.String jsxGet_pathname()
 Returns the pathname portion of the link's URL.
 java.lang.String jsxGet_port()
 Returns the port portion of the link's URL.
 java.lang.String jsxGet_protocol()
 Returns the protocol portion of the link's URL, including the trailing ':'.
 java.lang.String jsxGet_search()
 Returns the search portion of the link's URL (the portion starting with '?'
 java.lang.String jsxGet_target()
 Return the value of the target property of this link.
 void jsxSet_hash(java.lang.String hash)
 Sets the hash portion of the link's URL (the portion following the '#').
 void jsxSet_host(java.lang.String host)
 Sets the host portion of the link's URL (the '[hostname]:[port]' portion).
 void jsxSet_hostname(java.lang.String hostname)
 Sets the hostname portion of the link's URL.
 void jsxSet_href(java.lang.String href)
 Set the href property.
 void jsxSet_name(java.lang.String name)
 Set the name property.
 void jsxSet_pathname(java.lang.String pathname)
 Sets the pathname portion of the link's URL.
 void jsxSet_port(java.lang.String port)
 Sets the port portion of the link's URL.
 void jsxSet_protocol(java.lang.String protocol)
 Sets the protocol portion of the link's URL.
 void jsxSet_search(java.lang.String search)
 Sets the search portion of the link's URL (the portion starting with '?'
 void jsxSet_target(java.lang.String target)
 set the target property of this link.
 
Methods inherited from class com.gargoylesoftware.htmlunit.javascript.host.FocusableHostElement
jsxFunction_blur, jsxFunction_focus
 
Methods inherited from class com.gargoylesoftware.htmlunit.javascript.host.HTMLElement
addComponentRequest, clearComponentRequest, compareVersions, doComponentRequest, getAvailHeight, getAvailWidth, getBufferDepth, getColorDepth, getComponentVersion, getConnectionType, getCookieEnabled, getCpuClass, getHeight, getJavaEnabled, getPlatform, getSystemLanguage, getUserLanguage, getWidth, getWithFallback, isComponentInstalled, isHomePage, jsxFunction_addBehavior, jsxFunction_getAttribute, jsxFunction_getAttributeNode, jsxFunction_getBoundingClientRect, jsxFunction_getClientRects, jsxFunction_getElementsByTagName, jsxFunction_insertAdjacentElement, jsxFunction_insertAdjacentHTML, jsxFunction_removeAttribute, jsxFunction_removeBehavior, jsxFunction_scrollIntoView, jsxFunction_setAttribute, jsxFunction_setAttributeNode, jsxGet_all, jsxGet_children, jsxGet_className, jsxGet_currentStyle, jsxGet_disabled, jsxGet_id, jsxGet_innerHTML, jsxGet_innerText, jsxGet_localName, jsxGet_namespaceURI, jsxGet_offsetHeight, jsxGet_offsetLeft, jsxGet_offsetParent, jsxGet_offsetTop, jsxGet_offsetWidth, jsxGet_onblur, jsxGet_onclick, jsxGet_oncontextmenu, jsxGet_ondblclick, jsxGet_onfocus, jsxGet_onkeydown, jsxGet_onkeypress, jsxGet_onkeyup, jsxGet_onmousedown, jsxGet_onmousemove, jsxGet_onmouseout, jsxGet_onmouseover, jsxGet_onmouseup, jsxGet_onresize, jsxGet_outerHTML, jsxGet_ownerDocument, jsxGet_parentElement, jsxGet_prefix, jsxGet_runtimeStyle, jsxGet_scrollHeight, jsxGet_scrollLeft, jsxGet_scrollTop, jsxGet_scrollWidth, jsxGet_style, jsxGet_tagName, jsxGet_title, jsxSet_className, jsxSet_disabled, jsxSet_id, jsxSet_innerHTML, jsxSet_innerText, jsxSet_onblur, jsxSet_onclick, jsxSet_oncontextmenu, jsxSet_ondblclick, jsxSet_onfocus, jsxSet_onkeydown, jsxSet_onkeypress, jsxSet_onkeyup, jsxSet_onmousedown, jsxSet_onmousemove, jsxSet_onmouseout, jsxSet_onmouseover, jsxSet_onmouseup, jsxSet_onresize, jsxSet_outerHTML, jsxSet_scrollLeft, jsxSet_scrollTop, jsxSet_title, navigateHomePage, setDomNode, setHomePage, startDownload, toString
 
Methods inherited from class com.gargoylesoftware.htmlunit.javascript.host.NodeImpl
executeEvent, fireEvent, getEventHandler, jsxFunction_addEventListener, jsxFunction_appendChild, jsxFunction_attachEvent, jsxFunction_cloneNode, jsxFunction_detachEvent, jsxFunction_hasChildNodes, jsxFunction_insertBefore, jsxFunction_isSameNode, jsxFunction_removeChild, jsxFunction_removeEventListener, jsxFunction_replaceChild, jsxGet_childNodes, jsxGet_firstChild, jsxGet_lastChild, jsxGet_nextSibling, jsxGet_nodeName, jsxGet_nodeType, jsxGet_nodeValue, jsxGet_parentNode, jsxGet_previousSibling, jsxSet_nodeValue, setEventHandler
 
Methods inherited from class com.gargoylesoftware.htmlunit.javascript.SimpleScriptable
get, getBooleanArg, getClassName, getDomNodeOrDie, getDomNodeOrNull, getHtmlElementOrDie, getHtmlElementOrNull, getIntArg, getObjectArg, getStringArg, makeScriptableFor, setHtmlElement
 
Methods inherited from class org.mozilla.javascript.ScriptableObject
associateValue, avoidObjectDetection, callMethod, callMethod, defineClass, defineClass, defineClass, defineConst, defineConstProperty, defineFunctionProperties, defineProperty, defineProperty, defineProperty, defineProperty, delete, delete, deleteProperty, deleteProperty, get, getAllIds, getAssociatedValue, getAttributes, getAttributes, getAttributes, getAttributes, getClassPrototype, getDefaultValue, getFunctionPrototype, getGetterOrSetter, getIds, getObjectPrototype, getParentScope, getProperty, getProperty, getPropertyIds, getPrototype, getTopLevelScope, getTopScopeValue, has, has, hasInstance, hasProperty, hasProperty, isConst, isSealed, put, put, putConst, putConstProperty, putProperty, putProperty, redefineProperty, sealObject, setAttributes, setAttributes, setAttributes, setAttributes, setGetterOrSetter, setParentScope, setPrototype
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.mozilla.javascript.Scriptable
delete, delete, get, get, getClassName, getIds, getParentScope, getPrototype, has, has, hasInstance, put, put, setParentScope, setPrototype
 

Constructor Detail

Anchor

public Anchor()
Create an instance.

Method Detail

getDefaultValue

public java.lang.Object getDefaultValue(java.lang.Class hint)
Calls for instance for implicit conversion to string

Specified by:
getDefaultValue in interface org.mozilla.javascript.Scriptable
Overrides:
getDefaultValue in class SimpleScriptable
Parameters:
hint - the type hint
Returns:
the default value
See Also:
SimpleScriptable.getDefaultValue(java.lang.Class)

jsConstructor

public void jsConstructor()
Javascript constructor. This must be declared in every javascript file because the rhino engine won't walk up the hierarchy looking for constructors.


jsxGet_hash

public java.lang.String jsxGet_hash()
                             throws java.lang.Exception
Returns the hash portion of the link's URL (the portion following the '#').

Returns:
The hash portion of the link's URL.
Throws:
java.lang.Exception - If an error occurs.
See Also:
MSDN Documentation

jsxGet_host

public java.lang.String jsxGet_host()
                             throws java.lang.Exception
Returns the host portion of the link's URL (the '[hostname]:[port]' portion).

Returns:
The host portion of the link's URL.
Throws:
java.lang.Exception - If an error occurs.
See Also:
MSDN Documentation

jsxGet_hostname

public java.lang.String jsxGet_hostname()
                                 throws java.lang.Exception
Returns the hostname portion of the link's URL.

Returns:
The hostname portion of the link's URL.
Throws:
java.lang.Exception - If an error occurs.
See Also:
MSDN Documentation

jsxGet_href

public java.lang.String jsxGet_href()
                             throws java.lang.Exception
Return the value of the href property of this link.

Returns:
The href property.
Throws:
java.lang.Exception - If an error occurs.

jsxGet_name

public java.lang.String jsxGet_name()
                             throws java.lang.Exception
Return the value of the name property of this link.

Returns:
The name property.
Throws:
java.lang.Exception - If an error occurs.

jsxGet_pathname

public java.lang.String jsxGet_pathname()
                                 throws java.lang.Exception
Returns the pathname portion of the link's URL.

Returns:
The pathname portion of the link's URL.
Throws:
java.lang.Exception - If an error occurs.
See Also:
MSDN Documentation

jsxGet_port

public java.lang.String jsxGet_port()
                             throws java.lang.Exception
Returns the port portion of the link's URL.

Returns:
The port portion of the link's URL.
Throws:
java.lang.Exception - If an error occurs.
See Also:
MSDN Documentation

jsxGet_protocol

public java.lang.String jsxGet_protocol()
                                 throws java.lang.Exception
Returns the protocol portion of the link's URL, including the trailing ':'.

Returns:
The protocol portion of the link's URL, including the trailing ':'.
Throws:
java.lang.Exception - If an error occurs.
See Also:
MSDN Documentation

jsxGet_search

public java.lang.String jsxGet_search()
                               throws java.lang.Exception
Returns the search portion of the link's URL (the portion starting with '?' and up to but not including any '#').

Returns:
The search portion of the link's URL.
Throws:
java.lang.Exception - If an error occurs.
See Also:
MSDN Documentation

jsxGet_target

public java.lang.String jsxGet_target()
Return the value of the target property of this link.

Returns:
The href property.

jsxSet_hash

public void jsxSet_hash(java.lang.String hash)
                 throws java.lang.Exception
Sets the hash portion of the link's URL (the portion following the '#').

Parameters:
hash - The new hash portion of the link's URL.
Throws:
java.lang.Exception - If an error occurs.
See Also:
MSDN Documentation

jsxSet_host

public void jsxSet_host(java.lang.String host)
                 throws java.lang.Exception
Sets the host portion of the link's URL (the '[hostname]:[port]' portion).

Parameters:
host - The new host portion of the link's URL.
Throws:
java.lang.Exception - If an error occurs.
See Also:
MSDN Documentation

jsxSet_hostname

public void jsxSet_hostname(java.lang.String hostname)
                     throws java.lang.Exception
Sets the hostname portion of the link's URL.

Parameters:
hostname - The new hostname portion of the link's URL.
Throws:
java.lang.Exception - If an error occurs.
See Also:
MSDN Documentation

jsxSet_href

public void jsxSet_href(java.lang.String href)
Set the href property.

Parameters:
href - href attribute value.

jsxSet_name

public void jsxSet_name(java.lang.String name)
Set the name property.

Parameters:
name - name attribute value.

jsxSet_pathname

public void jsxSet_pathname(java.lang.String pathname)
                     throws java.lang.Exception
Sets the pathname portion of the link's URL.

Parameters:
pathname - The new pathname portion of the link's URL.
Throws:
java.lang.Exception - If an error occurs.
See Also:
MSDN Documentation

jsxSet_port

public void jsxSet_port(java.lang.String port)
                 throws java.lang.Exception
Sets the port portion of the link's URL.

Parameters:
port - The new port portion of the link's URL.
Throws:
java.lang.Exception - If an error occurs.
See Also:
MSDN Documentation

jsxSet_protocol

public void jsxSet_protocol(java.lang.String protocol)
                     throws java.lang.Exception
Sets the protocol portion of the link's URL.

Parameters:
protocol - The new protocol portion of the link's URL.
Throws:
java.lang.Exception - If an error occurs.
See Also:
MSDN Documentation

jsxSet_search

public void jsxSet_search(java.lang.String search)
                   throws java.lang.Exception
Sets the search portion of the link's URL (the portion starting with '?' and up to but not including any '#')..

Parameters:
search - The new search portion of the link's URL.
Throws:
java.lang.Exception - If an error occurs.
See Also:
MSDN Documentation

jsxSet_target

public void jsxSet_target(java.lang.String target)
set the target property of this link.

Parameters:
target - target attribute value.


Copyright © 2003-2016 AppPerfect Corporation. All Rights Reserved.