5

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+)

1 Answer 1

7

Try setting that to your webview settings :

yourWebViewObject.getSettings().setDomStorageEnabled(true);
Sign up to request clarification or add additional context in comments.

1 Comment

saurabh try like this localStorage.setItem("foo","thanks"); alert(localStorage.getItem("foo"));thanks to christophecvb,it helps me

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.