WARNING: Most of this content (with the exception of the Mozilla 1.9 XPCOM reference) is very old, and can be expected to be out of date and possibly obsolete. For better XUL documentation, please visit the XUL hub at the Mozilla Developer Center.

nsIFormHistory2

IID:a61f0a62-ae0a-4382-b474-d259442ca80c
Inherits From:nsISupports

The nsIFormHistory object is a service which holds a set of name/value pairs. The names correspond to form field names, and the values correspond to values the user has submitted. So, several values may exist for a single name.

Note: this interface provides no means to access stored values. Stored values are used by the FormFillController to generate autocomplete matches.


Properties

readonly PRBool hasEntries

Returns true if the form history has any entries.


Methods

void addEntry ( AString name , AString value ) PRBool entryExists ( AString name , AString value ) PRBool nameExists ( AString name ) void removeAllEntries ( ) void removeEntriesForName ( AString name ) void removeEntry ( AString name , AString value )

void addEntry ( AString name , AString value )

Adds a name and value pair to the form history.

Arguments:
name
value

PRBool entryExists ( AString name , AString value )

Gets whether a name and value pair exists in the form history.

Arguments:
name
value

PRBool nameExists ( AString name )

Returns true if there is no entry that is paired with a name.

Arguments:
name

void removeAllEntries ( )

Removes all entries in the entire form history.


void removeEntriesForName ( AString name )

Removes all entries that are paired with a name.

Arguments:
name

void removeEntry ( AString name , AString value )

Removes a name and value pair from the form history.

Arguments:
name
value

References

This interface is passed as an argument to the following methods:

nsIFormHistoryImporter.importFormHistory

Reference documentation is generated from Mozilla's source.

Copyright © 1999-2006 XULPlanet.com