title: How to tell if a DOM element is displayed?
body: <p>This is not to be confused with <a href="https://stackoverflow.com/questions/123999/how-to-tell-if-a-dom-element-is-visible">"How to tell if a DOM element is visible?"</a></p>
  
  <p>I want to determine if a given DOM element is visible on the page.
  E.g. if the element is a child of a parent which has <code>display:none;</code> set, then it won't be visible.</p>
  
  <p>(This has nothing to do with whether the element is in the viewport or not)</p>
  
  <p>I could iterate through each parent of the element, checking the <code>display</code> style, but I'd like to know if there is a more direct way?</p>