Puppeteer: How to loop over the inner html of all elements in a page?

In a Node.js script I want to do a full text search of a web page using Puppeteer. The page’s URL is passed as a parameter to the script. For the search only text actually appearing visibly on the page should be considered.

So, I was thinking to loop over all page elements and match each element’s innerHTML against the search string (or pattern). Page.$$eval() seems to be the method of choice to apply a function to a selection of elements. However, you have to pass a selector and in my case I just need all elements (i.e. no selection).

Is there a way to apply a function to, or loop over, all elements in a page?