title: sql.js cant find var SQL and db
body: <p>I dont know if I forget something totally basic here but in my HTML:</p>
  
  <pre><code>&lt;script src="scripts/sql.js" type="text/javascript"&gt;&lt;/script&gt;
  </code></pre>
  
  <p>and my js-file looks like this: </p>
  
  <pre><code>var xhr = new XMLHttpRequest();
  xhr.open('GET', '123.sqlite3', true);
  xhr.responseType = 'arraybuffer';
  
  xhr.onload = function(e) {
    var uInt8Array = new Uint8Array(this.response);
    db = new SQL.Database(uInt8Array);
  };
  xhr.send();
  
  function getSearchFromSQL() {
      result = db.exec("SELECT * FROM data") ;
      document.getElementById('output').innerHTML = result ;
  }
  </code></pre>
  
  <p>As a result i only get </p>
  
  <pre><code>[object Object]
  </code></pre>
  
  <p>Netbeans tells me that the global variables db and SQL are not declared but I just cant figure out why, since its in the sql.js</p>