I am trying to extend Mozilla's find capability so that when a search string is entered, it highlights all occurrences of said string in the currently focussed frame. Of interest in this problem is the nsIWebBrowserFind::findNext method, which finds, highlights and scrolls an occurrence of the search string into view. I am trying to find a way to approach this problem. My preliminary ideas are:
a) Write a new XPCOM nsIWebBrowserFindMultiple interface and adapt the findNext source to highlight all occurrences of the search string. b) Perhaps exploit the scriptability of the nsIWebBrowserFind interface? I am not too sure if/how this would work, but suggestions are welcome. Hints on any other approaches would also be greatly appreciated. Thanks for your time. Vishy.
