title: Pass extra argument to IntersectionObserver?
body: <p>How would I pass an extra argument to the IntersectionObserver? I am trying to create a lazyload plugin for Vue. It works fine like this but I also want to be able to call a provided directive function.</p>
  
  <pre><code>const lazyload = {
      install(Vue) {
          const observer = new IntersectionObserver((entries) =&gt; {
              entries.forEach((entry) =&gt; {
                  if (entry.intersectionRatio &gt; 0) {
                      console.log('In viewport');
                  }
              });
          });
  
          Vue.directive('lazy', {
              inserted(element) {
                  observer.observe(element);
              }
          });
      }
  };
  </code></pre>
  
  <p>This would mean that in the inserted function I would set <code>binding</code> as the second argument.</p>
  
  <pre><code>inserted(element, binding)
  </code></pre>
  
  <p>How would I pass this binding though so that I could use it within my IntersectionObserver callback?</p>
  
  <p>In the end it should be able to look something like this:</p>
  
  <pre><code>&lt;div class="col-sm-6" v-lazy="fire"&gt;
  </code></pre>