nsISupports
Last changed in Gecko 1.7 A session history listener is notified when pages are added to, removed from, and loaded from session history. The listener can prevent any action (except adding a new session history entry) from happening by returning false from the corresponding callback method.
A session history listener can be registered on a particular nsISHistory instance via the nsISHistory.addSHistoryListener() method.
boolean OnHistoryGoBack(in nsIURI aBackURI); |
boolean OnHistoryGoForward(in nsIURI aForwardURI); |
boolean OnHistoryGotoIndex(in long aIndex, in nsIURI aGotoURI); |
void OnHistoryNewEntry(in nsIURI aNewURI); |
boolean OnHistoryPurge(in long aNumEntries); |
boolean OnHistoryReload(in nsIURI aReloadURI, in unsigned long aReloadFlags); |
Called when navigating to a previous session history entry, for example due to an nsIWebNavigation.goBack() call.
boolean OnHistoryGoBack( in nsIURI aBackURI );
aBackURItrue to allow the go back operation to proceed or false to cancel it.
Called when navigating to a next session history entry, for example due to an nsIWebNavigation.goForward() call.
boolean OnHistoryGoForward( in nsIURI aForwardURI );
aForwardURItrue to allow the go forward operation to proceed or false to cancel it.
Called when navigating to a session history entry by index, for example, when nsIWebNavigation.gotoIndex() is called.
boolean OnHistoryGotoIndex( in long aIndex, in nsIURI aGotoURI );
aIndexaGotoURItrue to allow the operation to proceed or false to cancel it.
Called when a new document is added to session history. New documents are added to session history by the docshell when new pages are loaded in a frame or content area; for example by calling nsIWebNavigation.loadURI().
void OnHistoryNewEntry( in nsIURI aNewURI );
aNewURICalled when entries are removed from session history. Entries can be removed from session history for various reasons; for example to control the browser's memory usage, 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().
boolean OnHistoryPurge( in long aNumEntries );
aNumEntriestrue to allow the purge operation to proceed or false to cancel it.
Called when the current document is reloaded, for example due to an nsIWebNavigation.reload() call.
boolean OnHistoryReload( in nsIURI aReloadURI, in unsigned long aReloadFlags );
aReloadURIaReloadFlagsnsIWebNavigation interface's load constants.true to allow the reload operation to proceed or false to cancel it.