0

I am learning Chrome Extension and created a sample Options page in it and storing a input's value in localStorage using the code in options.js

localStorage['refresh_rate'] = document.getElementById('refresh_rate').value;

And this is working on the options.html page, it is receiving the value inside localstorage, but when I am trying to get the same in extension, it is giving value undefined.

I wrote:

alert(localStorage['refresh_rate']);

and it is alerting a text - undefined Is there any other method to get the value?

Please note: i have already allowed storage in manifest.json using below lines

"permissions": [
    "storage"
]
jivvy
  • 27
  • 4

0 Answers0