'Open Google Chrome search-in-page function with JavaScript

Is it somehow possible to open this search with JavaScript ?

If yes, can we also pass it some default value ?

enter image description here

Context

I want to create a search function that highlight every element in my page that match the searched functionality like this

enter image description here



Solution 1:[1]

Try using window.find(stringtofind)

Src: https://developer.mozilla.org/en-US/docs/Web/API/Window/find

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Shreyas Agrawal