title: Failed to execute 'observe' on 'IntersectionObserver': parameter 1 is not of type 'Element'
body: <p>I have been facing an error in following code star marked option but it was executed the last run of my project but actually today it shows &quot;Failed to execute 'observe' on 'IntersectionObserver': parameter 1 is not of type 'Element'.&quot; on the browser.</p>
  <pre><code>const counters = document.querySelectorAll(&quot;.counter&quot;);
    function playCounter() {
      counters.forEach((counter) =&gt; {
        counter.innerText = 0;
  
        let point = +counter.dataset.count;
  
        let step = point / 100;
  
        let startCount = function () {
          let displayCount = +counter.innerText;
  
          if (displayCount &lt; point) {
            counter.innerText = Math.ceil(displayCount + step);
            setTimeout(startCount, 500);
          } else {
            counter.innerText = point;
          }
        };
        startCount();
      });
    }
  
    let counterSection = document.querySelector(&quot;.counter_wrapper&quot;);
  
    let scope = {
      borderMargin: &quot;0px 0px -200px 0px&quot;,
    };
    const sectionObserver = new IntersectionObserver(function (entry) {
      if (entry[0].isIntersecting) {
        playCounter();
      }
    }, scope);
    **sectionObserver.observe(counterSection);**
  </code></pre>