nsIWebBrowserFind 编辑
embedding/components/find/public/nsIWebBrowserFind.idl
Scriptable Searches for text in a web browser. Inherits from: nsISupports
Last changed in Gecko 1.7Get 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
Attribute | Type | Description |
entireWord | boolean | Whether to match entire words only. Default is false . |
findBackwards | boolean | Whether to find backwards (towards the beginning of the document). Default is false (search forward). |
matchCase | boolean | Whether to match case (case sensitive) when searching. Default is false . |
searchFrames | boolean | Whether to search through all frames in the content area. Default is nsIWebBrowserFindInFrames , but if one, but not both, of searchSubframes and searchParentFrames are set, this returns false . |
searchString | wstring | The string to search for. This must be non-empty to search. |
wrapFind | boolean | Whether 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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论