Interface nsIWebBrowserFindType

nsIWebBrowserFind

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.

Hierarchy

Properties

entireWord: boolean

entireWord

Whether to match entire words only. Default is false.

findBackwards: boolean

findBackwards

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

matchCase: boolean

matchCase

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

matchDiacritics: boolean

matchDiacritics

Whether to match diacritics when searching. Default is false.

searchFrames: boolean

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.

searchString: string

searchString

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

wrapFind: boolean

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

  • Increases the reference count for this interface. The associated instance will not be deleted unless the reference count is returned to zero.

    Returns

    The resulting reference count.

    Returns number

  • Parameters

    • aIID: object
    • Optional aInstancePtr: object

    Returns any

  • A run time mechanism for interface discovery.

    Returns

    NS_OK if the interface is supported by the associated instance, NS_NOINTERFACE if it is not.

    aInstancePtr must not be null.

    Parameters

    • aIID: object

      [in] A requested interface IID

    • aInstancePtr: object

      [out] A pointer to an interface pointer to receive the result.

    Returns void

  • Decreases the reference count for this interface. Generally, if the reference count returns to zero, the associated instance is deleted.

    Returns

    The resulting reference count.

    Returns number

  • 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

    Returns boolean

Generated using TypeDoc