Tutorial: View.stopFindInPage

View.stopFindInPage

Stop a findInPage call by specifying any of these actions:

  • clearSelection - Clear the selection.
  • keepSelection - Translate the selection into a normal selection.
  • activateSelection - Focus and click the selection node.

Example

const view = fin.View.getCurrentSync();

view.addListener('found-in-page', (event) => {
    setTimeout(() => {
        view.stopFindInPage('clearSelection');
    }, 5000);
});

view.findInPage('a').then(results => {
    console.log(results);
});