title: How to set value in localStorage of webView
body: <p>I am connecting to url which loads only if token value is set properly to my webView browser.</p>
  
  <p>This is a script where null value of userToken is found when I start my webView:</p>
  
  <pre><code>$.ajaxSetup({
      data: {
          token: localStorage.userToken
      }
  });
  
  sendToApp = function(_key, _val) {
      var iframe = document.createElement("IFRAME");
      iframe.setAttribute("src", _key + ":##sendToApp##" + _val);
      document.documentElement.appendChild(iframe);
      iframe.parentNode.removeChild(iframe);iframe = null;
  }
  
  IsMobile = true;
  
  $.when(
  
      loadData.setup()
  
  ).then(function(data) {
  
      Setup = data;
  
      Struct = new App.Collection.Struct();
      View = new App.View.Phone();
      Zone = new App.Collection.Zone();
  
      Zone.setAll();
      Zone.findWhere({id:"0"}).set('path', 'Favourites')
      Struct.startLoop();
  });
  </code></pre>
  
  <p>I receive error:</p>
  
  <pre><code>I/chromium: [INFO:CONSOLE(3)] "Uncaught TypeError: Cannot read property 'userToken' of null" , source: http://217.76.112.72:60180/js/mobile.js (3)
  </code></pre>
  
  <p>How can I set userToken to local storage of my android webView so this value won't be null anymore? </p>
  
  <p>I read few threads about webView database or javascript parameters setting but I can't find answer to my question:</p>
  
  <p>JS property setting: </p>
  
  <p><a href="https://stackoverflow.com/questions/27938209/uncaught-typeerror-cannot-set-property-value-of-null-in-android">Uncaught TypeError: Cannot set property &#39;value&#39; of &gt; null&quot; in Android</a></p>
  
  <p>Database topic:</p>
  
  <p><a href="https://stackoverflow.com/questions/5899087/android-webview-localstorage">Android webview &amp; localStorage</a></p>
  
  <p><a href="https://stackoverflow.com/questions/10556111/using-local-storage-on-android-webview">Using local storage on Android webview</a></p>
  
  <p>For example in those topics people are setting path to some kind of database which from what I understood is localStorage but if am I right how can I set value to it?</p>
  
  <p>Edit: my webView setup:</p>
  
  <pre><code>public void setupWebView(String url, String token) {
      HashMap&lt;String, String&gt; map = new HashMap&lt;&gt;();
      map.put("userToken", token);
  
      webView.getSettings().setDomStorageEnabled(true);
      webView.getSettings().setJavaScriptEnabled(true);
      webView.loadUrl(url, map);
  }
  </code></pre>