Tutorial: View.findInPage


Finds all matches for the specified text in the web page. By default, each subsequent call will highlight the next text that matches the search term.

Returns a promise with the results for the request. By subscribing to the found-in-page event, you can get the results of this call as well.


const view = fin.View.getCurrentSync();

//By subscribing to the 'found in page' event we can get the results of each findInPage call made.
view.addListener('found-in-page', (event) => {

// The promise also returns the results for the request
view.findInPage('a').then((result) => {