You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Mar 3, 2022. It is now read-only.
First, I think this library is really amazing. You have great internal interfaces which allow one to nicely implement alternative implementations. E.g., I am using this library inside a Chrome extension so I implemented a storage class to use extension storage and specialized extension popup.
But I also want to run this library in a service worker of the extension. And things became complicated there: service workers do not have XMLHttpRequest, but only fetch. So I had to fork and change the JsonService code (again, great interface!) to use fetch (see #1335 for PR because I think that should be default). The reason for fork is that it is not really easy to use a custom JsonService class. Currently, JsonService is passed as a default value for a parameter to a constructor in multiple places, but it is hard to change that default value or pass some other value to those parameters.
I would suggest that all those constructor parameters with default values are also configured through config parameter. For example, in MetadataService, the initialization could then be instead of: