nsIFormHistory2

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.
1.0
28
Introduced
Gecko 1.8
Inherits from: nsISupports Last changed in Gecko 1.9.1 (Firefox 3.5 / Thunderbird 3.0 / SeaMonkey 2.0)

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

Method overview

void addEntry(in AString name, in AString value);
boolean entryExists(in AString name, in AString value);
boolean nameExists(in AString name);
void removeAllEntries();
void removeEntriesByTimeframe(in long long aBeginTime, in long long aEndTime);
void removeEntriesForName(in AString name);
void removeEntry(in AString name, in AString value);

Attributes

Attribute Type Description
DBConnection mozIStorageConnection Returns the underlying DB connection the form history module is using. Read only.
hasEntries boolean Returns true if the form history has any entries. Read only.

Methods

addEntry()

Adds a name and value pair to the form history.

void addEntry(
  in AString name,
  in AString value
);
Parameters
name
value

entryExists()

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

boolean entryExists(
  in AString name,
  in AString value
);
Parameters
name
value
Return value

 

nameExists()

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

boolean nameExists(
  in AString name
);
Parameters
name
Return value

 

removeAllEntries()

Removes all entries in the entire form history.

void removeAllEntries();
Parameters

None.

Requires Gecko 1.9.1 (Firefox 3.5 / Thunderbird 3.0 / SeaMonkey 2.0)

removeEntriesByTimeframe()

Removes entries that were created between the specified times.

void removeEntriesByTimeframe(
  in long long aBeginTime,
  in long long aEndTime
);
Parameters
aBeginTime
The beginning of the timeframe, in microseconds.
aEndTime
The end of the timeframe, in microseconds.

removeEntriesForName()

Removes all entries that are paired with a name.

void removeEntriesForName(
  in AString name
);
Parameters
name

removeEntry()

Removes a name and value pair from the form history.

void removeEntry(
  in AString name,
  in AString value
);
Parameters
name
value

Document Tags and Contributors

 Contributors to this page: Sheppy, trevorh
 Last updated by: Sheppy,