RobinCK / vue-ls

:boom: Vue plugin for work with local storage, session storage and memory storage from Vue context 🇺🇦
https://robinck.gitbooks.io/vue-storage/
MIT License
538 stars 49 forks source link

Handle security exception thrown when accessing store #183

Closed bentleyo closed 2 years ago

bentleyo commented 2 years ago

In some situations a security exception will be thrown by the browser when trying to access window.localStorage or window.sessionStorage.

One situation is if your vue app is inside an iframe on a page viewed in incognito mode. When this exception is thrown it prevents the entire vue app from booting.

Here is an example from the developer tools console in the context of the iframe.

Screen Shot 2022-03-17 at 17 07 26
RobinCK commented 2 years ago

@bentleyo thank you