window.localStorage.removeItem does not work inside the page

0

Recently tried to use the command:

 window.localStorage.removeItem('chave');

I just wanted to delete the registry from that key in my local storage. When I tried it on the browser console, I got the expected result, but putting it in a script within a page did nothing.

What can it be? Any browser protection? (Google Chrome)

    
asked by anonymous 29.06.2018 / 20:03

0 answers