title: 'Not defined' error with Masonry javascript plugin
body: <p>I am using <a href="http://vanilla-masonry.desandro.com/docs/intro.html" rel="nofollow">Vanilla Masonry</a> (the raw JS, non-jQuery version) as follows:</p>
  
  <p>In head:</p>
  
  <pre><code>&lt;script id="masonry" type="text/javascript" src="resources/js/masonry.js"&gt;&lt;/script&gt;
  </code></pre>
  
  <p>In body:</p>
  
  <pre><code>&lt;script&gt;
  window.onload = function() {
    var wall = new Masonry( document.getElementById('ext-component-3'), {
      columnWidth: 145
    });
  };
  &lt;/script&gt;
  </code></pre>
  
  <p>But I keep getting:</p>
  
  <pre><code>Uncaught ReferenceError: Masonry is not defined 
  Uncaught TypeError: Cannot call method 'appendChild' of undefined
  </code></pre>
  
  <p>Does anyone know what could be wrong in my setup?</p>