r/javascript • • Jan 12 '23

JavaScript localStorage: The complete guide

https://deadsimplechat.com/blog/javascript-localstorage-complete-guide/
2 Upvotes

6 comments sorted by

View all comments

4

u/THE_AWESOM-O_4000 Jan 12 '23

Why are you manually creating StorageEvents? They get generated by other tabs on the same domain whenever a storage object gets modified. window.addEventListener('storage',...