shubhamjain / svg-loader

Plug 'n Play external SVG loader
MIT License
196 stars 20 forks source link

A mutation operation was attempted on a database that did not allow mutations #13

Closed sarunluitel closed 2 years ago

sarunluitel commented 2 years ago

image

DOMException: A mutation operation was attempted on a database that did not allow mutations. I see this exception thrown when using this. functionally it's not causing any issues and I have been ignoring it.

** This issue only exists on firefox. no such error messages on chrome or safari

Just letting you know it's there. if this is a known issue feel free to close it.

shubhamjain commented 2 years ago

I believe this could be related to https://bugzilla.mozilla.org/show_bug.cgi?id=781982.

I was able to reproduce this in private mode in Mozilla Firefox. This won't affect icon loading itself, but caching will not work.

What we can do is to add have a fallback mechanism. Try IndexedDB. If that doesn't work, try localStorage. If that doesn't work caching can be disabled.

sarunluitel commented 2 years ago

Thank you for looking into this. Like I mentioned there is no effect on the functionality as I am only caching the svgs from the cache control headers. I'll keep this issue open for others to track if they are caching. thanks again

shubhamjain commented 2 years ago

I have added a bunch of fixes that should fix this issue and other. Would be glad if you had any feedback to share.

https://github.com/shubhamjain/svg-loader/pull/16

sarunluitel commented 2 years ago

This issue seems solved. Thank You!