-
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,
initializeCache
needs a bit more explaining that it's a user cache -
StorageInfo
should not be a[NoInterfaceObject]
interface, with a prototype and everything. It should just be a dictionary. In other words, it should haveObject.prototype
as its prototype, instead ofStorageInfo.prototype
, whereStorageInfo
is 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 hownavigator
-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 ofnavigator
. Wheeeeee.) -
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) -
Use
DOMException
to reject promises, notDOMError
. -
StorageWatcher
could benefit from an example. -
StorageWatcher
rate
parameter should probably be in milliseconds, not seconds---timespans in JavaScript are usually milliseconds.
Examples
this section probably needs to be marked non-normative
optinally
typo
Constructors for StorageWatcher
and StorageEvent
, yay!
Pretty nice promise usage and verbiage, modulo the DOMError
snafu.
Overall, very nice, simple, and idiomatic.
Two moments: