I wonder if they'll ever fix `localStorage` in private Safari windows. It breaks countless sites and Safari is the only browser to block it.
It's in the spec, maybe developers should make their websites a bit more resilient to the very real errors that can happen? Did they just forget about error handling?
'' e.name.toLowerCase().includes("quota")
But in any case, your application should be interacting with localStorage through an in-memory facade, otherwise it's still going to break with lots of other edge-cases. All operations should be treated as volatile, and probably silently suppressed on failures.
Using a facade also makes testing easier, and if you avoid global side-effects it becomes easier to parallelize test-cases.