Closed chucker closed 5 years ago
As per the docs the onstorage event only fires when storage is updated from another document.
For example, open the app in two tabs in Chome and make a change to localstorage on tab 1, the event will fire in tab 2.
I'm going to go ahead and close this as there doesn't seem to be a problem with Blazored.LocalStorage.
Given a component with this:
And an
index.html
snippet like this:_SetDarkMode
does show up/toggle the value in Chrome's Application tab. However, theonstorage
event never fires that way.So I'm wondering if Chrome does something else to 'commit' the value (there doesn't appear to be a function like
refresh()
orsave()
), or if this is perhaps a side effect of the code running in an async or wasm context.