title: How to write localStorage data to a text file in Chrome
body: <p>I want to write a localStorage item to a text file and want to invoke user to store the file in a specified location. Please help me with extending the code  </p>
  
  <pre><code>  var data = JSON.parse(localStorage.getItem(pid));   
    var Text2Write = "";
    for(var pr in ele)
    {
       var dat = pr + ":" + ele[pr] + "\n";
       Text2Write += dat;
    }
    // Here I want to store this Text2Write to text file and ask user to save where he wants.  
  </code></pre>
  
  <p>Please help me extending this code.</p>