On Wed, Jul 16, 2014 at 9:08 PM, Dave Hylands <dhyla...@mozilla.com> wrote:
> Currently, we have navigator.getDeviceStorage and > navigator.getDeviceStorages > > We're looking to expand device storage to add support for more virtual > storage areas, like DropBox, or GoogleDrive, etc. > See bug 1035053 > > I was going to propose that we add navigator.deviceStorage (or possibly > navigator.mozDeviceStorage) and have at least the following methods: > > deviceStorage.addObserver > deviceStorage.removeObserver > addObserver/removeObserver are Gecko-isms that don't really have a counterpart in Web APIs. Why not use an EventListener? > deviceStorage.getAll > deviceStorage.getDefault > > We need some new notifications, one to report when the default volume has > changed (on B2G it is controlled by a setting which then gets reflected > into a preference), one to report when a new storage area (like DropBox) is > added, and one to report when it goes away. Presumably we'd also need > additional APIs to actually add/remove storage areas. > > deviceStorage.getAll would return exactly what navigator.getDeviceStorages > returns today, and deviceStorage.getDefault would return exactly what > navigator.getDevicetorages returns today. > > I think that we probably need to leave getDeviceStorage and > getDeviceStorages both around for the time being in order to maintain > backwards capability. > So getAll/getDefault would be exactly like getDeviceStorage()/getDeviceStorages? If so, I'm not really sure what we gain from this renaming... Cheers, Ehsan _______________________________________________ dev-platform mailing list dev-platform@lists.mozilla.org https://lists.mozilla.org/listinfo/dev-platform