title: How to check if key is not found in IndexedDB?
body: <p>On the indexeddb i want to look if there is a key <code>permanent</code> and do some actions. But if not, i want to make some other actions. I can do the actions if the <code>permanent</code> is there, however when it is not I can get the onerror to work. Is the <code>onerror</code> suppose to do this thing? How can I check if there is not value in it?</p>
  
  <pre><code>var hashtype='permanent';
      var getPermanent = store.get(hashtype);
  
  getPermanent.onsuccess = function() {
      var ivrame=getPermanent.result.value;
  };
  
  getPermanent.onerror = function() {
    console.log('onerror')
  };
  </code></pre>