You are currently viewing a snapshot of www.mozilla.org taken on April 21, 2008. Most of this content is highly out of date (some pages haven't been updated since the project began in 1998) and exists for historical purposes only. If there are any pages on this archive site that you think should be added back to www.mozilla.org, please file a bug.
nsISHistoryListener
This interface must be implemented by an object that wishes to receive notifications about activities in History. A history listener will be notified when pages are added, removed and loaded from session history. A listener to session history can be registered using the interface
nsISHistory
. This interface is scriptable.Notifies a listener when a new document is added to session history. New documents are added to the session history by the docshell when new pages are loaded in a frame or content area.
Syntax:
void nsISHistoryListener::OnHistoryNewEntry( in nsIURI aNewURI)Parameters:
nsresult:
Notifies a listener when the user presses the 'back' button of the browser OR when the user attempts to go back one page in history through other means, either through scripting or by using
nsIWebNavigation.
Syntax:
boolean nsISHistoryListener::OnHistoryGoBack( in nsIURI aBackURI)Parameters:
Returns:
aReturn
A boolean flag returned by the listener to indicate if the back operation is to be aborted or continued. If the listener returnsTRUE
, it indicates that the back operation can be continued. If the listener returnsFALSE
, then the back operation will be aborted. This is a mechanism by which the listener can control the user's interaction with history.
Notifies a listener when the user presses the 'forward' button of the browser OR when the user attempts to go forward one page in history through other means, either through scripting or by using
nsIWebNavigation.
Syntax:
boolean nsISHistoryListener::OnHistoryGoForward( in nsIURI aForwardURI)Parameters:
Returns:
aReturn
A boolean flag returned by the listener to indicate if the forward operation is to be aborted or continued. If the listener returnsTRUE
, it indicates that the forward operation can be continued. If the listener returnsFALSE
, then the forward operation will be aborted. This is a mechanism by which the listener can control the user's interaction with history.
Notifies a listener when the user presses the 'reload' button of the browser OR when the user attempts to reload the current document through other means, either through scripting or by using
nsIWebNavigation.
Syntax:
boolean nsISHistoryListener::OnHistoryReload( in nsIURI aReloadURI, in unsigned long aReloadFlags)Parameters:
aReloadFlags:
Flags that indicate how the document is to be refreshed; from cache, for example, or bypassing the cache and/or proxy server.
Returns:
aReturn
A boolean flag returned by the listener to indicate if the reload operation is to be aborted or continued. If the listener returnsTRUE
, it indicates that the reload operation can be continued. If the listener returnsFALSE
, then the reload operation will be aborted. This is a mechanism by which the listener can control the user's interaction with history.
Notifies a listener when the user visits a page using the 'Go' menu of the browser OR when the user attempts to go to a page at a particular index through other means, like from JavaScript or using
nsIWebNavigation
.Syntax:
boolean nsISHistoryListener::OnHistoryGotoIndex( in long aIndex, in nsIURI aGotoURI)Parameters:
Returns:
aReturn
A boolean flag returned by the listener to indicate if theGotoIndex
operation is to be aborted or continued. If the listener returnsTRUE
, it indicates that theGotoIndex
operation can be continued. If the listener returnsFALSE
, then theGotoIndex
operation will be aborted. This is a mechanism by which the listener can control the user's interaction with history.
Notifies a listener when documents are removed from session history. Documents can be removed from session history for various reasons. For example to control the memory usage of the browser, to prevent users from loading documents from history, to erase evidence of prior page loads etc. To purge documents from session history call
nsISHistory::PurgeHistory.
Syntax:
boolean nsISHistoryListener::OnHistoryPurge( in long aNumEntries)Parameters:
Returns:
aReturn
A boolean flag returned by the listener to indicate if the purge operation is to be aborted or continued. If the listener returnsTRUE
, it indicates that the purge operation can be continued. If the listener returnsFALSE
, then the purge operation will be aborted. This is a mechanism by which the listener can control the user's interaction with history.
Written by:Ellen Evans | Comments, questions, complaints?
Bug 143387 |