title: Intersection Observer API not working with hidden elements
body: <p>I am trying to observe a hidden element. I have an element which has style set to <code>display: none</code>. I want when my element intersect it will perform my action i.e: Play the video. I am sharing my sample code below</p>
  
  <pre><code> var options = {threshold: 0.5 }     
  
   var circle = document.getElementById('content_video');
  
   var observer = new IntersectionObserver(entries =&gt; {
       var [{ isIntersecting }] = entries
       if (isIntersecting) {
           player.play();
           player.ima.getAdsManager().resume();
       } else {
           player.ima.getAdsManager().pause();
       }
   }, options);
  
   window.addEventListener('load', () =&gt; {
       if ('IntersectionObserver' in window) observer.observe(circle);
   }, false);
  </code></pre>