title: How to use navigator instead of window.webkitStorageInfo HTML5 File-system API?
body: <p>So there is a similar post found here <a href="https://stackoverflow.com/questions/17116467/html-5-filesystem-access-type-error">html-5-filesystem-access-type-error</a>. However, I'm not very satisfied with the conclusion because I do not feel it actually answered the question - the solution given is the deprecated code solution. Does anyone know how to use <code>navigator</code> instead of <code>window</code> as the Chrome console is informing to do?</p>
  
  <p>I have been using the following and it works, but the chrome console keeps informing me not to do so because it is deprecated. </p>
  
  <p><strong>Working Deprecated Code</strong></p>
  
  <pre><code>window.webkitStorageInfo.requestQuota(PERSISTENT, 1024*1024*280, function(grantedBytes) {
      window.webkitRequestFileSystem(PERSISTENT, grantedBytes, onInitFs, errorHandler); 
  }, function(e) {
      console.log('Error', e); 
  });
  </code></pre>
  
  <p><em>Note: <code>onInitFs</code> and <code>errorHandler</code> are both functions defined elsewhere, that work.</em></p>
  
  <p><strong>Console Log</strong> - The message I get in the console is as follows:</p>
  
  <pre><code>'window.webkitStorageInfo' is deprecated. Please use 'navigator.webkitTemporaryStorage'
  or 'navigator.webkitPersistentStorage' instead. 
  </code></pre>
  
  <p>So the best practice would be to stop using the deprecated method. Unfortunately, when I replace <code>window</code> with <code>navigator</code> it crashes (see below). How does one use <code>navigator</code> instead of <code>window</code> to access the file system?</p>