nsIWebBrowserFind

IID:2f977d44-5485-11d4-87e2-0010a4e75ef2
Inherits From:nsISupports
Status:FROZEN

Searches for text in a web browser.

Get one by doing a GetInterface on an nsIWebBrowser.

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

This interface is implemented by the following components:


Properties

PRBool entireWord

EntireWord

Whether to match entire words only. Default is false.

PRBool findBackwards

FindBackwards

Whether to find backwards (towards the beginning of the document). Default is false (search forward).

PRBool matchCase

MatchCase

Whether to match case (case sensitive) when searching. Default is false.

PRBool searchFrames

SearchFrames

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.

PRUnichar* searchString

SearchString

The string to search for. This must be non-empty to search.

PRBool wrapFind

WrapFind

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

PRBool findNext ( )

PRBool 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.

Returns:
Whether an occurrence was found

Reference documentation is generated from Mozilla's source.

Add a note User Contributed Notes
No comments available

Copyright © 1999 - 2005 XULPlanet.com