title: Difference in variable handling between Chrome and Firefox
body: <p>I have a problem with Javascript variables that only occurs in firefox and not in chrome.</p>
  
  <pre><code>&lt;input id="test" type="file"/&gt;
  &lt;script&gt;
      var f = document.getElementById('test').files;
      var value = f;
      var i = setInterval(() =&gt; {
          f = document.getElementById('test').files;
          if (f == value) {
              console.log(true);
              console.log(f);
              console.log(value);
          } else {
              console.log(false);
              console.log(f);
              console.log(value);
              value = f;
              clearInterval(i);
          }
      }, 1000);
  &lt;/script&gt;
  </code></pre>
  
  <p>this code keeps putting true in the console log and is supposed to track variable changes.
  in chrome, if i choose a file with the file input tag. it will track the variable difference between variable 'value' and variable 'f'. this will cause it to console.log(false) and terminate the setInterval.  however, in firefox after selecting a file with the file input both variables are instantly updated and firefox wont be able to track any differences. causing the script to never end.</p>
  
  <p>heres a fiddle: <a href="https://jsfiddle.net/y9jh6a1t/" rel="nofollow noreferrer">https://jsfiddle.net/y9jh6a1t/</a></p>
  
  <p>i wish to replicate chromes behaviour in firefox.</p>