References to storage specs seem a bit off.
- WEBSTORAGE is in HTML now, right?
- FileSystem APIs are too in flux
- WebSQL is dead
The Promise interface is currently defined and discussed in the WHATWG DOM specification.
Should reference ES6
In the example,
initializeCacheneeds a bit more explaining that it's a user cache
StorageInfoshould not be a
[NoInterfaceObject]interface, with a prototype and everything. It should just be a dictionary. In other words, it should have
Object.prototypeas its prototype, instead of
StorageInfois an un-callable function.
Actually, the same applies to
StorageQuota, for different reasons. It's used as a namespace, not as a class, and WebIDL dictionaries match that better I think. (I dunno, this might not be a battle worth fighting; I guess this is just how
navigator-extending specs work these days. You create a non-constructable class with the appropriate methods, somehow magically construct an instance of that class, then make that instance a property of
readonly attribute StorageType supportedTypes;: we should make sure this is a frozen array object, as per recent discussion by Jonas et al. in that bug. I assume this cannot change at runtime (but this would be good for the spec to clarify)
DOMExceptionto reject promises, not
StorageWatchercould benefit from an example.
this section probably needs to be marked non-normative
Pretty nice promise usage and verbiage, modulo the
Overall, very nice, simple, and idiomatic.