*Summary*: IDBTransaction objects will gain a commit() function that explicitly marks a transaction as not accepting further requests. Currently, IndexedDB only commits a transaction after all associated requests have had their completion event handlers executed, and no new requests have been queued by the event handlers. Developers can use the explicit commit() functionality to shave a few event loop cycles off of the latency of their transactions. A diagram showcasing the semantics of commit() is available at https://github.com/w3c/IndexedDB/pull/242#issuecomment-446421869
*Bug*: https://bugzilla.mozilla.org/show_bug.cgi?id=1497007 *Standard*: Added to the spec via https://github.com/w3c/IndexedDB/pull/242 *Platform coverage*: All platforms. *Preference*: This will be added without a preference. *DevTools bug*: None. Specific support in DevTools is probably not necessary. *Other browsers*: Chrome: shipped (since version 76) Opera: shipped (since version 63) Edge: considering ( https://github.com/w3c/IndexedDB/pull/242#issuecomment-428385752) Safari: considering ( https://github.com/w3c/IndexedDB/issues/234#issuecomment-391109023) *web-platform-tests*: Available at https://github.com/web-platform-tests/wpt/blob/master/IndexedDB/idb-explicit-commit.any.js *Secure contexts*: Chrome/Blink shipped this without [SecureContext]. There was some discussion about Blink adding [SecureContext], but it didn't happen. It's not clear whether we should mark it as [SecureContext] given that commit is feature-detectable, or whether browser consistency is desirable and okay given that no part of the IndexedDB API is behind a feature flag. A concern would be that if code is written that assumes the commit method exists and it is called inside an IndexedDB callback, the resulting thrown exception would cause the underlying IndexedDB transaction to abort. *Is this feature enabled by default in sandboxed iframes? * The feature is available wherever IndexedDB is available. _______________________________________________ dev-platform mailing list dev-platform@lists.mozilla.org https://lists.mozilla.org/listinfo/dev-platform