In Gecko 1.9, the findbar widget moved into toolkit, so it's available to any XUL application, as well as extensions.
For example, the standard findbar in Firefox 3.5 looks like this on the Mac:
You may attach a findbar to a particular browser element by either setting the findbar's browserid attribute to the ID of the browser element before the findbar element is bound, or by setting the findbar's browser property to the browser element itself.
<browser type="content-primary" flex="1" id="content" src="about:blank"/> <findbar id="FindToolbar" browserid="content"/>
findnextaccesskey
findbar
.findpreviousaccesskey
findbar
.highlightaccesskey
findbar
.matchcaseaccesskey
findbar
. Inherited Properties |
findMode
FIND_NORMAL
(0): Normal findFIND_TYPEAHEAD
(1): Typeahead findFIND_LINKS
(2): Link findclose()
notificationbox
or findbar
.open( mode )
findbar
using the specified mode, which should be one of FIND_NORMAL
, FIND_TYPEAHEAD
, or FIND_LINKS
. If you don't pass a mode, the last-used mode for the same findbar is used. If the findbar hasn't been used before, FIND_NORMAL
is the default.onFindAgainCommand( findPrevious )
startFind( mode )
findbar
, focuses the edit field for the search term, and selects its contents. The first time this is called for a given findbar, the findbar will flash to draw attention to itself. The mode should be one of FIND_NORMAL
, FIND_TYPEAHEAD
, or FIND_LINKS
. If you don't pass a mode, the last-used mode for the same findbar is used. If the findbar hasn't been used before, FIND_NORMAL
is the default.toggleHighlight( highlight )
false
to disable highlighting or true
to enable it.