day8 / re-frame-10x

A debugging dashboard for re-frame. X-ray vision as tooling.
MIT License
634 stars 68 forks source link

Relax hard requirement on LocalStorage #308

Closed bshepherdson closed 3 years ago

bshepherdson commented 3 years ago

My (admittedly unusual) app architecture calls for running a re-frame app inside a sandboxed iframe. That works fine, but trying to add re-frame-10x during development causes errors.

re-frame-10x uses LocalStorage for saving various settings, and access to LocalStorage is blocked for sandboxed iframes.

It would be great if that code was tweaked to fail gracefully, rather than crash, if window.localStorage is unavailable. (One path might be to use the goog.testing.storage.FakeMechanism if a real one fails.)

superstructor commented 3 years ago

Would happily accept a pull request for goog.testing.storage.FakeMechanism if you are willing and able @shepheb 😉

bshepherdson commented 3 years ago

I'll take a look.