com.gargoylesoftware.htmlunit.javascript.host.html
Class HTMLAnchorElement

java.lang.Object
  extended by net.sourceforge.htmlunit.corejs.javascript.ScriptableObject
      extended by com.gargoylesoftware.htmlunit.javascript.SimpleScriptable
          extended by com.gargoylesoftware.htmlunit.javascript.host.Node
              extended by com.gargoylesoftware.htmlunit.javascript.host.EventNode
                  extended by com.gargoylesoftware.htmlunit.javascript.host.Element
                      extended by com.gargoylesoftware.htmlunit.javascript.host.html.HTMLElement
                          extended by com.gargoylesoftware.htmlunit.javascript.host.html.HTMLAnchorElement
All Implemented Interfaces:
ScriptableWithFallbackGetter, Serializable, Cloneable, net.sourceforge.htmlunit.corejs.javascript.ConstProperties, net.sourceforge.htmlunit.corejs.javascript.debug.DebuggableObject, net.sourceforge.htmlunit.corejs.javascript.Scriptable

public class HTMLAnchorElement
extends HTMLElement

The JavaScript object that represents an anchor.

Version:
$Revision: 8391 $
Author:
Mike Bowler, Alexei Goussev, David D. Kilzer, Marc Guillemot, Chris Erskine, Ahmed Ashour, Sudhan Moghe, Daniel Gredler, Ronald Brill
See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class com.gargoylesoftware.htmlunit.javascript.host.html.HTMLElement
HTMLElement.ProxyDomNode
 
Field Summary
 
Fields inherited from class com.gargoylesoftware.htmlunit.javascript.host.html.HTMLElement
BEHAVIOR_ID_CLIENT_CAPS, BEHAVIOR_ID_DOWNLOAD, BEHAVIOR_ID_HOMEPAGE
 
Fields inherited from class com.gargoylesoftware.htmlunit.javascript.host.Node
ATTRIBUTE_NODE, CDATA_SECTION_NODE, COMMENT_NODE, DOCUMENT_FRAGMENT_NODE, DOCUMENT_NODE, DOCUMENT_POSITION_CONTAINED_BY, DOCUMENT_POSITION_CONTAINS, DOCUMENT_POSITION_DISCONNECTED, DOCUMENT_POSITION_FOLLOWING, DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC, DOCUMENT_POSITION_PRECEDING, DOCUMENT_TYPE_NODE, ELEMENT_NODE, ENTITY_NODE, ENTITY_REFERENCE_NODE, NOTATION_NODE, PROCESSING_INSTRUCTION_NODE, TEXT_NODE
 
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
HTMLAnchorElement()
           
 
Method Summary
 String getAccessKey()
          Returns the "accessKey" property.
 String getDefaultStyleDisplay()
          INTERNAL API - SUBJECT TO CHANGE AT ANY TIME - USE AT YOUR OWN RISK.
INTERNAL API - SUBJECT TO CHANGE AT ANY TIME - USE AT YOUR OWN RISK.
Returns the default display style.
 Object getDefaultValue(Class<?> hint)
          Calls for instance for implicit conversion to string.
 String getHash()
          Returns the hash portion of the link's URL (the portion following the '#', including the '#').
 String getHost()
          Returns the host portion of the link's URL (the '[hostname]:[port]' portion).
 String getHostname()
          Returns the hostname portion of the link's URL.
 String getHref()
          Returns the value of this link's href property.
 String getName()
          Returns the value of the name property of this link.
 String getPathname()
          Returns the pathname portion of the link's URL.
 String getPort()
          Returns the port portion of the link's URL.
 String getProtocol()
          Returns the protocol portion of the link's URL, including the trailing ':'.
 String getRel()
          Returns the value of the rel property.
 String getRev()
          Returns the value of the rev property.
 String getSearch()
          Returns the search portion of the link's URL (the portion starting with '?' and up to but not including any '#').
 String getTarget()
          Returns the value of the target property of this link.
 void setAccessKey(String accessKey)
          Sets the "accessKey" property.
 void setHash(String hash)
          Sets the hash portion of the link's URL (the portion following the '#').
 void setHost(String host)
          Sets the host portion of the link's URL (the '[hostname]:[port]' portion).
 void setHostname(String hostname)
          Sets the hostname portion of the link's URL.
 void setHref(String href)
          Sets the href property.
 void setName(String name)
          Sets the name property.
 void setPathname(String pathname)
          Sets the pathname portion of the link's URL.
 void setPort(String port)
          Sets the port portion of the link's URL.
 void setProtocol(String protocol)
          Sets the protocol portion of the link's URL.
 void setRel(String rel)
          Sets the rel property.
 void setRev(String rel)
          Sets the rev property.
 void setSearch(String search)
          Sets the search portion of the link's URL (the portion starting with '?' and up to but not including any '#')..
 void setTarget(String target)
          Sets the target property of this link.
 
Methods inherited from class com.gargoylesoftware.htmlunit.javascript.host.html.HTMLElement
addBehavior, addComponentRequest, blur, clearAttributes, clearComponentRequest, click, compareVersions, createEventHandler, createTextRange, dispatchEvent, doComponentRequest, doScroll, fixAttributeName, focus, get, getAlign, getAll, getAttribute, getAttributeNode, getAttributeNodeNS, getAvailHeight, getAvailWidth, getBoundingClientRect, getBoxObject, getBufferDepth, getCh, getChildren, getChOff, getClassList, getClassName_js, getClientHeight, getClientLeft, getClientRects, getClientTop, getClientWidth, getColorDepth, getComponentVersion, getConnectionType, getCookieEnabled, getCpuClass, getDataset, getDir, getDisabled, getDocument, getDomNodeOrDie, getDomNodeOrNull, getElementsByClassName, getFilters, getHeight, getId, getInnerHTML, getInnerText, getJavaEnabled, getLang, getLanguage, getLocalName, getNamespaceURI, getNodeName, getOffsetHeight, getOffsetLeft, getOffsetParent_js, getOffsetTop, getOffsetWidth, getOnchange, getOnsubmit, getOuterHTML, getParentElement, getParentHTMLElement, getPlatform, getPosX, getPosY, getPrefix, getScopeName, getScrollHeight, getScrollLeft, getScrollTop, getScrollWidth, getSpellcheck, getSystemLanguage, getTabIndex, getTagName, getTagUrn, getTitle, getUniqueID, getUserLanguage, getVAlign, getWidth, getWidthOrHeight, getWithFallback, hasAttribute, insertAdjacentElement, insertAdjacentHTML, isAncestorOfEventTarget, isAttributeName, isComponentInstalled, isEndTagForbidden, isHomePage, isLowerCaseInOuterHtml, mergeAttributes, navigateHomePage, parseHtmlSnippet, querySelector, querySelectorAll, readAttributes, removeAttributeNode, removeBehavior, removeExpression, removeNode, scrollIntoView, setActive, setAlign, setAttribute, setAttributeNode, setCh, setChOff, setClassName, setColorAttribute, setDir, setDisabled, setDomNode, setExpression, setHomePage, setId, setInnerHTML, setInnerText, setLang, setLanguage, setOnchange, setOnsubmit, setOuterHTML, setScrollLeft, setScrollTop, setSpellcheck, setTabIndex, setTagUrn, setTextContent, setTitle, setVAlign, setWidthOrHeight, startDownload, toString
 
Methods inherited from class com.gargoylesoftware.htmlunit.javascript.host.Element
createAttributesObject, getAttributeNS, getAttributes, getBaseURI, getChildElementCount, getCurrentStyle, getElementsByTagName, getElementsByTagNameNS, getFirstElementChild, getLastElementChild, getNextElementSibling, getPreviousElementSibling, getRuntimeStyle, getStyle, getText, hasAttributeNS, removeAttribute, removeAttributeNS, selectNodes, selectSingleNode, setAttributeNS, setDefaults
 
Methods inherited from class com.gargoylesoftware.htmlunit.javascript.host.EventNode
fireEvent, getOnblur, getOnclick, getOncontextmenu, getOndblclick, getOnerror, getOnfocus, getOnfocusin, getOnfocusout, getOnkeydown, getOnkeypress, getOnkeyup, getOnmousedown, getOnmousemove, getOnmouseout, getOnmouseover, getOnmouseup, getOnpropertychange, getOnresize, setOnblur, setOnclick, setOncontextmenu, setOndblclick, setOnerror, setOnfocus, setOnfocusin, setOnfocusout, setOnkeydown, setOnkeypress, setOnkeyup, setOnmousedown, setOnmousemove, setOnmouseout, setOnmouseover, setOnmouseup, setOnpropertychange, setOnresize
 
Methods inherited from class com.gargoylesoftware.htmlunit.javascript.host.Node
addEventListener, appendChild, attachEvent, cloneNode, compareDocumentPosition, contains, detachEvent, executeEvent, fireEvent, fireEvent, getBaseName, getChildNodes, getEventHandler, getEventHandlerProp, getFirstChild, getJavaScriptNode, getLastChild, getNextSibling, getNodeType, getNodeValue, getOwnerDocument, getParent, getParentNode, getPreviousSibling, getTextContent, getXml, hasChildNodes, hasEventHandlers, insertBefore, insertBeforeImpl, isSameNode, normalize, removeChild, removeEventListener, replaceChild, setEventHandler, setEventHandlerProp, setNodeValue
 
Methods inherited from class com.gargoylesoftware.htmlunit.javascript.SimpleScriptable
clone, defineFunctionProperties, defineProperty, equivalentValues, getBrowserVersion, getClassName, getPrototype, getScriptableFor, getStartingScope, getTransformerScriptableFor, getWindow, getWindow, getWithPreemption, hasInstance, initParentScope, isReadOnlySettable, makeScriptableFor, setCaseSensitive, setDomNode, setHtmlElement, setParentScope
 
Methods inherited from class net.sourceforge.htmlunit.corejs.javascript.ScriptableObject
applyDescriptorToAttributeBitset, associateValue, avoidObjectDetection, buildDataDescriptor, callMethod, callMethod, checkPropertyChange, checkPropertyDefinition, defineClass, defineClass, defineClass, defineConst, defineConstProperty, defineOwnProperties, defineOwnProperty, defineOwnProperty, defineProperty, defineProperty, defineProperty, delete, delete, deleteProperty, deleteProperty, ensureScriptable, ensureScriptableObject, get, get, getAllIds, getArrayPrototype, getAssociatedValue, getAttributes, getAttributes, getAttributes, getAttributes, getClassPrototype, getDefaultValue, getFunctionPrototype, getGetterOrSetter, getIds, getObjectPrototype, getOwnPropertyDescriptor, getParentScope, getProperty, getProperty, getPropertyIds, getPrototype, getSlot, getTopLevelScope, getTopScopeValue, getTypedProperty, getTypedProperty, getTypeOf, has, has, hasProperty, hasProperty, isAccessorDescriptor, isConst, isDataDescriptor, isEmpty, isExtensible, isFalse, isGenericDescriptor, isGetterOrSetter, isSealed, isTrue, preventExtensions, put, put, putConst, putConstProperty, putProperty, putProperty, redefineProperty, sameValue, sealObject, setAttributes, setAttributes, setAttributes, setAttributes, setGetterOrSetter, setPrototype, size
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface net.sourceforge.htmlunit.corejs.javascript.Scriptable
delete, delete, get, getClassName, getIds, getParentScope, getPrototype, has, has, hasInstance, put, put, setParentScope, setPrototype
 

Constructor Detail

HTMLAnchorElement

public HTMLAnchorElement()
Method Detail

setHref

public void setHref(String href)
Sets the href property.

Parameters:
href - the href property value

getHref

public String getHref()
Returns the value of this link's href property.

Returns:
the value of this link's href property

setName

public void setName(String name)
Sets the name property.

Parameters:
name - name attribute value

getName

public String getName()
Returns the value of the name property of this link.

Returns:
the name property

setTarget

public void setTarget(String target)
Sets the target property of this link.

Parameters:
target - target attribute value

getTarget

public String getTarget()
Returns the value of the target property of this link.

Returns:
the href property

setRel

public void setRel(String rel)
Sets the rel property.

Parameters:
rel - rel attribute value

getRel

public String getRel()
Returns the value of the rel property.

Returns:
the rel property

setRev

public void setRev(String rel)
Sets the rev property.

Parameters:
rel - rev attribute value

getRev

public String getRev()
Returns the value of the rev property.

Returns:
the rev property

getSearch

public String getSearch()
                 throws 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:
Exception - if an error occurs
See Also:
MSDN Documentation

setSearch

public void setSearch(String search)
               throws 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:
Exception - if an error occurs
See Also:
MSDN Documentation

getHash

public String getHash()
               throws Exception
Returns the hash portion of the link's URL (the portion following the '#', including the '#').

Returns:
the hash portion of the link's URL
Throws:
Exception - if an error occurs
See Also:
MSDN Documentation

setHash

public void setHash(String hash)
             throws 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:
Exception - if an error occurs
See Also:
MSDN Documentation

getHost

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

Returns:
the host portion of the link's URL
Throws:
Exception - if an error occurs
See Also:
MSDN Documentation

setHost

public void setHost(String host)
             throws 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:
Exception - if an error occurs
See Also:
MSDN Documentation

getHostname

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

Returns:
the hostname portion of the link's URL
Throws:
Exception - if an error occurs
See Also:
MSDN Documentation

setHostname

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

Parameters:
hostname - the new hostname portion of the link's URL
Throws:
Exception - if an error occurs
See Also:
MSDN Documentation

getPathname

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

Returns:
the pathname portion of the link's URL
Throws:
Exception - if an error occurs
See Also:
MSDN Documentation

setPathname

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

Parameters:
pathname - the new pathname portion of the link's URL
Throws:
Exception - if an error occurs
See Also:
MSDN Documentation

getPort

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

Returns:
the port portion of the link's URL
Throws:
Exception - if an error occurs
See Also:
MSDN Documentation

setPort

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

Parameters:
port - the new port portion of the link's URL
Throws:
Exception - if an error occurs
See Also:
MSDN Documentation

getProtocol

public String getProtocol()
                   throws 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:
Exception - if an error occurs
See Also:
MSDN Documentation

setProtocol

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

Parameters:
protocol - the new protocol portion of the link's URL
Throws:
Exception - if an error occurs
See Also:
MSDN Documentation

getDefaultValue

public Object getDefaultValue(Class<?> hint)
Calls for instance for implicit conversion to string.

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

getAccessKey

public String getAccessKey()
Returns the "accessKey" property. Overridden to modify browser configurations.

Overrides:
getAccessKey in class HTMLElement
Returns:
the "accessKey" property

setAccessKey

public void setAccessKey(String accessKey)
Sets the "accessKey" property. Overridden to modify browser configurations.

Overrides:
setAccessKey in class HTMLElement
Parameters:
accessKey - the "accessKey" property

getDefaultStyleDisplay

public String getDefaultStyleDisplay()
INTERNAL API - SUBJECT TO CHANGE AT ANY TIME - USE AT YOUR OWN RISK.
INTERNAL API - SUBJECT TO CHANGE AT ANY TIME - USE AT YOUR OWN RISK.
Returns the default display style.

Overrides:
getDefaultStyleDisplay in class Element
Returns:
the default display style.


Copyright © 2002–2013 Gargoyle Software Inc.. All rights reserved.