nsIWebBrowserFind 编辑

embedding/components/find/public/nsIWebBrowserFind.idlScriptable Searches for text in a web browser. Inherits from: nsISupports Last changed in Gecko 1.7

Get one by doing a GetInterface on an nsIWebBrowser.

By default, the implementation will search the focused frame, or if there is no focused frame, the web browser content area. It does not by default search subframes or iframes. To change this behavior, and to explicitly set the frame to search, QueryInterface to nsIWebBrowserFindInFrames.

Method overview

boolean findNext();

Attributes

AttributeTypeDescription
entireWordbooleanWhether to match entire words only. Default is false.
findBackwardsbooleanWhether to find backwards (towards the beginning of the document). Default is false (search forward).
matchCasebooleanWhether to match case (case sensitive) when searching. Default is false.
searchFramesboolean

Whether to search through all frames in the content area. Default is true.

Note: That you can control whether the search propagates into child or parent frames explicitly using nsIWebBrowserFindInFrames, but if one, but not both, of searchSubframes and searchParentFrames are set, this returns false.
searchStringwstringThe string to search for. This must be non-empty to search.
wrapFindbooleanWhether the search wraps around to the start (or end) of the document if no match was found between the current position and the end (or beginning). Works correctly when searching backwards. Default is false.

Methods

findNext()

Finds, highlights, and scrolls into view the next occurrence of the search string, using the current search settings. Fails if the search string is empty.

boolean findNext();
Parameters

None.

Return value

Whether an occurrence was found.

See also

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

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

发布评论

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

词条统计

浏览:85 次

字数:4193

最后编辑:7 年前

编辑次数:0 次

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