Back to index

lightning-sunbird  0.9+nobinonly
Public Member Functions
nsILink Class Reference

This interface allows SelectorMatches to get the canonical URL pointed to by an element representing a link and allows it to store the visited state of a link element in the link. More...

#include <nsILink.h>

Inheritance diagram for nsILink:
Inheritance graph
[legend]
Collaboration diagram for nsILink:
Collaboration graph
[legend]

List of all members.

Public Member Functions

NS_IMETHOD GetLinkState (nsLinkState &aState)=0
 Get the cached state of the link.
NS_IMETHOD SetLinkState (nsLinkState aState)=0
 Set the cached state of the link.
NS_IMETHOD GetHrefURI (nsIURI **aURI)=0
 Get a pointer to the fully href URI (fully resolved and canonicalized, since it's an nsIURI object).
NS_IMETHOD LinkAdded ()=0
 Dispatch a LinkAdded event to the nsIChromeEventHandler for this document.
NS_IMETHOD LinkRemoved ()=0
 Dispatch a LinkRemoved event to the nsIChromeEventHandler for this document.

Detailed Description

This interface allows SelectorMatches to get the canonical URL pointed to by an element representing a link and allows it to store the visited state of a link element in the link.

It is needed for performance reasons (to prevent copying of strings and excessive calls to history).

Definition at line 58 of file nsILink.h.


Member Function Documentation

NS_IMETHOD nsILink::GetHrefURI ( nsIURI **  aURI) [pure virtual]

Get a pointer to the fully href URI (fully resolved and canonicalized, since it's an nsIURI object).

Parameters:
aURI[out] A pointer to be filled in with a pointer to the URI If the element has no HREF attribute, it is set to nsnull.
Returns:
NS_OK if the out pointer is filled in (possibly with nsnull)

Implemented in nsHTMLAnchorElement, nsHTMLLinkElement, and nsHTMLAreaElement.

NS_IMETHOD nsILink::GetLinkState ( nsLinkState aState) [pure virtual]

Get the cached state of the link.

If the state is unknown, return eLinkState_Unknown.

Parameters:
aState[out] The cached link state of the link.
Returns:
NS_OK

Implemented in nsHTMLAnchorElement, nsHTMLLinkElement, and nsHTMLAreaElement.

NS_IMETHOD nsILink::LinkAdded ( ) [pure virtual]

Dispatch a LinkAdded event to the nsIChromeEventHandler for this document.

This is used to notify the chrome listeners when restoring a page presentation. Currently, this only applies to HTML <link> elements.

Implemented in nsHTMLAnchorElement, nsHTMLLinkElement, and nsHTMLAreaElement.

NS_IMETHOD nsILink::LinkRemoved ( ) [pure virtual]

Dispatch a LinkRemoved event to the nsIChromeEventHandler for this document.

This is used to notify the chrome listeners when saving a page presentation (since the document is not torn down). Currently, this only applies to HTML <link> elements.

Implemented in nsHTMLAnchorElement, nsHTMLLinkElement, and nsHTMLAreaElement.

NS_IMETHOD nsILink::SetLinkState ( nsLinkState  aState) [pure virtual]

Set the cached state of the link.

Parameters:
aStateThe cached link state of the link.
Returns:
NS_OK

Implemented in nsHTMLAnchorElement, nsHTMLLinkElement, and nsHTMLAreaElement.


The documentation for this class was generated from the following file: