Monday, May 20, 2024
124
rated 0 times [  130] [ 6]  / answers: 1 / hits: 18665  / 6 Years ago, fri, april 6, 2018, 12:00:00

I'm trying to access some data that is presented in discord app to write it to disc. Because I'm going to do that without human supervision every x seconds, I have thought of using localStorage to store this data, but It seems I can't access this object from the console. I get a localStorage is not defined error. I also tried windows.localStorage without any luck either.



Is there any way to achieve this from a electro app dev console?



Here a picture of the problem:
enter



Cheers.


More From » local-storage

 Answers
10

I guess you misspelled it. You should be able to access the localStorage as window.localStorage and an item 'X' inside it as, localStorage.getItem('X').



Attaching a screenshot of localStorage accessed in the console.



enter



Error Scenario screenshot



enter


[#54736] Wednesday, April 4, 2018, 6 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
kaceyr

Total Points: 510
Total Questions: 97
Total Answers: 116

Location: Solomon Islands
Member since Fri, Oct 8, 2021
3 Years ago
kaceyr questions
;