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.
This interface provides access to the primary properties of the Session History component. In an embedded browser environment, the
nsIWebBrowserobject creates an instance of session history for each open window. A handle to the session history object can be obtained from
nsIWebNavigation. In a non-embedded situation, the owner of the session history component must create a instance of it and set it in the
nsIWebNavigationobject. This interface is scriptable.
Obtains a handle to the history entry at a given index.
Syntax:nsIHistoryEntry nsISHistory::getEntryAtIndex( in long index,in boolean modifyIndex)
modifyIndex:A boolean flag that indicates if the current index of session history should be modified to the parameter index.
Purges older documents from history. Documents can be removed from session history for various reasons. For example to control memory usage of the browser, to prevent users from loading documents from history, to erase evidence of prior page loads etc.
Syntax:void nsISHistory::PurgeHistory(in long numEntries)
numEntries:The number of toplevel documents to be purged from history. During purge operation, the latest documents are maintained and older
numEntriesdocuments are removed from history.
Registers a listener for the session history component. Listeners are notified when pages are loaded or purged from history.
Syntax:void nsISHistory::addSHistoryListener( in nsISHistoryListener aListener)
Note: A listener object must implement
Removes a listener for the session history component. Listeners are notified when pages are loaded or purged from history.
Syntax:void nsISHistory::removeSHistoryListener( in nsISHistoryListener aListener)
Note:A listener object must implement
Gets an enumerator for all the documents stored in session history. The enumerator object thus returned by this method can be traversed using
Note: To access individual history entries of the enumerator, perform the following steps:2) Use
nsISimpleEnumerator->GetNexton the object returned by step #1 to obtain handle to the next object in the list. The object returned by this step is of type
Gets the number of toplevel documents currently available in session history.
Gets the index of the current document in session history.
Gets and sets the maximum number of toplevel documents session history can hold for each instance.
| Written by:Ellen Evans | Comments, questions, complaints?