Contact emails
chrome-ow...@chromium.org, andrea...@google.com, dmu...@chromium.org
Explainer
https://andreas-butler.github.io/idb-databases/EXPLAINER
Spec
https://pr-preview.s3.amazonaws.com/w3c/IndexedDB/pull/240.html#dom-idbfactory-databases
Summary
This change adds a database enumeration function to the Chromium implementation of the IndexedDB API to allow access to a list of current IndexedDB databases accessible by the current origin.
Link to “Intent to Implement” blink-dev discussion
https://groups.google.com/a/chromium.org/d/msg/blink-dev/qKjn0tLMezI/TCix0GI0CgAJ
Is this feature supported on all six Blink platforms (Windows, Mac, Linux, Chrome OS, Android, and Android WebView)?
Yes.
Debuggability
DevTools already supports listing IndexedDB database names.
Risks:
Interoperability and Compatibility
Edge: positive signals
LGTM’d by edge PM: https://github.com/w3c/IndexedDB/pull/240
Firefox: positive signals
https://github.com/w3c/IndexedDB/issues/31#issuecomment-323635338
Safari: Positive signals
https://github.com/w3c/IndexedDB/issues/31#issuecomment-324791267
Web developers: Positive signals
https://github.com/w3c/IndexedDB/issues/31#issuecomment-324756055 ,
https://github.com/w3c/IndexedDB/issues/31#issuecomment-323882274 ,
https://github.com/w3c/IndexedDB/issues/31#issuecomment-339070628 ,
https://stackoverflow.com/questions/15234363/indexeddb-view-all-databases-and-object-stores
Ergonomics
The database enumeration function will return a Promise of a Sequence of IDBDatabaseInfo objects. The IDBDatabaseInfo objects will essentially be dictionaries of informational fields relevant to the IndexedDB databases accessible by the frame.
Returning the database information as a list wrapped in a Promise was chosen over returning an IDBRequest object, contrary to what has previously been the pattern with IndexedDB functions because web development is moving in the direction of Promise-based asynchronous behaviour. As developers will not have been previously exposed to this standardized database enumeration function it is not expected that breaking the established pattern will cause serious issues. Additionally, keeping the IDBRequest object restricted to interactions with uniquely specified databases (eg: requests for opening / closing particular database instances ) was determined to be a cleaner design choice.
Activation
As this feature is fairly intuitive and simple (single function addition to existing API), it is not expected that it will be difficult for developers to take advantage of it immediately.
Is this feature fully tested by web-platform-tests? Link to test suite results from wpt.fyi.
https://wpt.fyi/results/IndexedDB/get-databases.any.html?label=experimental
https://wpt.fyi/results/IndexedDB/get-databases.any.worker.html?label=experimental
Entry on the feature dashboard
https://www.chromestatus.com/features/6084476278931456
Contact emails
--
You received this message because you are subscribed to the Google Groups "blink-dev" group.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CA%2B9KpLPrR3bV3cpq7dVG8WEe2wap07kAZhvUeX4%3D4Rpx9Aasqw%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CAP_mGKpotQaVrL%3DDmBxpA_gaJxBwy%3D2EaupRejWnK-Fw3L2syQ%40mail.gmail.com.
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CAARdPYfRtr8GvVc%3D-J9X5T9%2B5ya1mcydYqeEQxHqjTK%2BL3t%2Bxg%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/op.zruzcklqrbppqq%40cicero2.linkoping.osa.