In jQuery, you can use the :visible selector to get only the visible elements. To achieve this using plain JavaScript, you can iterate through all the elements and check if they are visible using the offsetHeight and offsetWidth properties.
index.tsx326 chars12 lines
This code will return an array of only the visible elements on the page.
gistlibby LogSnag