Home Reference Source Repository
public class | source

HTMLAnchorElement

Extends:

NodeParentNodeElementHTMLElement → HTMLAnchorElement

The HTMLAnchorElement interface represents hyperlink elements and provides special properties and methods (beyond those of the regular HTMLElement object interface they also have available to them by inheritance) for manipulating the layout and presentation of such elements.

See:

Constructor Summary

Public Constructor
public

Member Summary

Public Members
public get

hash: string: *

Is a DOMString representing the fragment identifier, including the leading hash mark ('#'), if any, in the referenced URL.

public set

hash(value: string): *

public get

host: string: *

Is a DOMString representing the hostname and port (if it's not the default port) in the referenced URL.

public set

host(value: string): *

public set

hostname(value: string): *

public get

Is a DOMString representing the hostname in the referenced URL.

public get

href: string: *

Is a DOMString that reflects the href HTML attribute, containing a valid URL of a linked resource.

public set

href(value: string): *

public get

Is a DOMString representing the path name component, if any, of the referenced URL.

public set

pathname(value: string): *

public get

Is a DOMString representing the protocol component, including trailing colon (':'), of the referenced URL.

public set

protocol(value: string): *

public get

rel: string: *

Is a DOMString that reflects the rel HTML attribute, specifying the relationship of the target object to the linked object.

public set

rel(value: string): *

Method Summary

Public Methods
public

setAttribute(key: *, value: *)

Inherited Summary

From class Node
public get
public set

nodeValue(value: *): *

public get

Returns the Document that this node belongs to.

public get
public

addEventListener(eventType: string, listener: function, capturingPhase: boolean): *

public
public

getAttribute(attributeName: string): string

get attribute's value

public

hasAttribute(attributeName: string): boolean

checks if attribute exists for node

public

removeAttribute(attributeName: string)

remove attribute

public

removeEventListener(eventType: string, listener: function, capturingPhase: boolean): boolean

public

setAttribute(attributeName: string, attributeValue: string)

set attribute's value

From class ParentNode
public get

TODO return {HTMLCollection}

public get
public get
public get
public get
public get
public

appendChild(child: Node): Node

public

Clone a Node, and optionally, all of its contents.

public

Method returns true if node has child nodes.

public

insertBefore(child: Node, existingChild: Node): Node

public

removeChild(toRemoveChild: Node): Node

public

replaceChild(newChild: Node, oldChild: Node): Node

protected

_createCollection(selector: *): *

Inner method to create new live HTMLCollection.

From class Element
public get
public get

Returns an unsigned long giving the amount of children that the object has.

public get

Returns a live HTMLCollection containing all objects of type Element that are children of this ParentNode.

public get

Returns the Element that is the first child of this ParentNode, or null if there is none.

public get

The id of the element.

public set

id(id: string): *

public get

Returns the Element that is the first child of this ParentNode, or null if there is none.

public get

Returns the Element immediately following the specified one in its parent's children list, or null if the specified element is the last one in the list.

public get

Returns the Element immediately prior to the specified one in its parent's children list, or null if the specified element is the first one in the list.

public get

The tag name of the element.

public

Returns a reference to the element by its ID.

public

The Element.getElementsByClassName() method returns a live HTMLCollection containing all child elements which have all of the given class names.

public

Returns an HTMLCollection of elements with the given tag name.

public

Returns the first element that is a descendant of the element on which it is invoked that matches the specified group of selectors.

public

Returns a non-live NodeList of all elements descended from the element on which it is invoked that match the specified group of CSS selectors.

From class HTMLElement
public get

The class of the element.

public set

className(className: string): *

public get

dataset: *

public

returns a token list of the class attribute of the element

public

returns a token list of the class attribute of the element

Public Constructors

public constructor source

Override:

HTMLElement#constructor

Public Members

public get hash: string: * source

Is a DOMString representing the fragment identifier, including the leading hash mark ('#'), if any, in the referenced URL.

Return:

string

public set hash(value: string): * source

public get host: string: * source

Is a DOMString representing the hostname and port (if it's not the default port) in the referenced URL.

Return:

string

public set host(value: string): * source

public set hostname(value: string): * source

public get hostname: string: * source

Is a DOMString representing the hostname in the referenced URL.

Return:

string

public get href: string: * source

Is a DOMString that reflects the href HTML attribute, containing a valid URL of a linked resource.

Return:

string

public set href(value: string): * source

public get pathname: string: * source

Is a DOMString representing the path name component, if any, of the referenced URL.

Return:

string

public set pathname(value: string): * source

public get protocol: string: * source

Is a DOMString representing the protocol component, including trailing colon (':'), of the referenced URL.

Return:

string

public set protocol(value: string): * source

public get rel: string: * source

Is a DOMString that reflects the rel HTML attribute, specifying the relationship of the target object to the linked object.

Return:

string

public set rel(value: string): * source

Public Methods

public setAttribute(key: *, value: *) source

Override:

Node#setAttribute

Params:

NameTypeAttributeDescription
key *
value *