mozIPlacesAutoComplete 编辑

toolkit/components/places/public/mozIPlacesAutoComplete.idlScriptable This interface provides some constants used by the Places AutoComplete search provider as well as methods to track opened pages for AutoComplete purposes. 1.0 66 Introduced Gecko 1.9.2 Inherits from: nsISupports Last changed in Gecko 2.0 (Firefox 4 / Thunderbird 3.3 / SeaMonkey 2.1)

Method overview

void registerOpenPage(in nsIURI aURI);
void unregisterOpenPage(in nsIURI aURI);

Constants

ConstantValueDescription
MATCH_ANYWHERE0Match anywhere in each searchable term.
MATCH_BOUNDARY_ANYWHERE1Match first on word boundaries, and if we do not get enough results, then match anywhere in each searchable term.
MATCH_BOUNDARY2Match on word boundaries in each searchable term.
MATCH_BEGINNING3Match only the beginning of each search term.
BEHAVIOR_HISTORY1 << 0Search through history.
BEHAVIOR_BOOKMARK1 << 1Search though bookmarks.
BEHAVIOR_TAG1 << 2Search through tags.
BEHAVIOR_TITLE1 << 3Search the title of pages.
BEHAVIOR_URL1 << 4Search the URL of pages.
BEHAVIOR_TYPED1 << 5Search for typed pages.
BEHAVIOR_JAVASCRIPT1 << 6Search javascript: URLs.
BEHAVIOR_OPENPAGE1 << 7Search for pages that have been marked as being opened, such as a tab in a tabbrowser.

Methods

registerOpenPage()

Mark a page as being currently open.

Note: Pages will not be automatically unregistered when Private Browsing mode is entered or exited. Therefore, consumers must unregister or register themselves.
void registerOpenPage(
  in nsIURI aURI
);
Parameters
aURI
The URI to register as an open page.

unregisterOpenPage()

Mark a page as no longer being open (either by closing the window or tab, or by navigating away from that page).

Note: Pages will not be automatically unregistered when Private Browsing mode is entered or exited. Therefore, consumers must unregister or register themselves.
void unregisterOpenPage(
  in nsIURI aURI
);
Parameters
aURI
The URI to unregister as an open page.

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

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

发布评论

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

词条统计

浏览:81 次

字数:4326

最后编辑:8年前

编辑次数:0 次

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