nsIFormHistory2 编辑

toolkit/components/satchel/public/nsIFormHistory.idlScriptable 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 66 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

AttributeTypeDescription
DBConnectionmozIStorageConnectionReturns the underlying DB connection the form history module is using. Read only.
hasEntriesbooleanReturns 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.

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

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据

词条统计

浏览:60 次

字数:5736

最后编辑:7年前

编辑次数:0 次

    我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
    原文