title: How can I check that an element is visible with Puppeteer and pure JavaScript?
body: <p>I wish to check that a DOM element is visible with <a href="https://github.com/GoogleChrome/puppeteer/" rel="noreferrer">Puppeteer</a> and pure JavaScript (not jQuery), how can I do this? By visible I mean that the element is displayed through CSS, and not hidden (f.ex. by <code>display: none</code>).</p>
  
  <p>For example, I can determine whether my element <code>#menu</code> is not hidden via CSS rule <code>display: none</code>, in the following way: </p>
  
  <pre><code>const isNotHidden = await page.$eval('#menu', (elem) =&gt; {
    return elem.style.display !== 'none'
  })
  </code></pre>
  
  <p>How can I determine in general though if the element is hidden or not, and not just through <code>display: none</code>?</p>