title: How exactly to use ResizeSensor?
body: <p>My goal is run a javascript function every time the size of an expanding textarea element changes, and from other questions I found this: <a href="http://marcj.github.io/css-element-queries/" rel="noreferrer">http://marcj.github.io/css-element-queries/</a> </p>
  
  <p>I downloaded it and put the css-element-queries folder on the server, and included it in the header:</p>
  
  <pre><code>&lt;script src="css-element-queries/src/ResizeSensor.js"&gt;&lt;/script&gt;
  &lt;script src="css-element-queries/src/ElementQueries.js"&gt;&lt;/script&gt;
  </code></pre>
  
  <p>Then in a javascript file that I'm using below, I have </p>
  
  <pre><code>ResizeSensor(document.getElementById('the_id'), function(){
  console.log("resized");
  the_function();
  });
  </code></pre>
  
  <p>But it doesn't do anything and gives an error: </p>
  
  <p>Uncaught TypeError: Cannot read property 'length' of null
      at forEachElement (ResizeSensor.js:46)
      at ResizeSensor (ResizeSensor.js:201)</p>