Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

android - html5 localstorage issue

While rendering HTML5 page in android where i had used localStorage of HTML5.

localStorage["temp"] = "test";

For above line it gives error: TypeError: 'null' is not an object (evaluating 'localStorage["temp"] = "test"').

(It works perfectly in browsers-chrome or firefox, In html5 storage page its written it supports android 2.0+)

like image 743
Neo Avatar asked Jul 22 '11 13:07

Neo


1 Answers

Try setting that to your webview settings :

yourWebViewObject.getSettings().setDomStorageEnabled(true);
like image 61
ChristopheCVB Avatar answered Sep 27 '22 19:09

ChristopheCVB