Skip to content

IDBDatabase

Generated from idl/indexeddb.webidl when the site was built at 7aa23e2.

IDBDatabase is an interface in idl/indexeddb.webidl, inheriting EventTarget, exposed in Window, Worker. What it does is on MDN; this page says what niso has of it.

The web features its members belong to, each with its Baseline status on the web and how much of the feature’s WPT suite passes in niso (see Web platform support).

Feature On the web In niso Members
IndexedDB Widely available Partial 95% 2929 of 3061 subtests pass 10
attribute
readonly attribute DOMString name;
int32_t niso_idb_database_get_name(niso_dom* dom, niso_handle self, niso_str* out);
attribute
readonly attribute unsigned long long version;
int32_t niso_idb_database_get_version(niso_dom* dom, niso_handle self, uint64_t* out);
attribute
readonly attribute DOMStringList objectStoreNames;
int32_t niso_idb_database_get_object_store_names(niso_dom* dom, niso_handle self, niso_handle* out);
operation
[NewObject] IDBTransaction transaction((DOMString or sequence<DOMString>) storeNames, optional IDBTransactionMode mode = "readonly", optional IDBTransactionOptions options = {});
int32_t niso_idb_database_transaction(niso_dom* dom, niso_handle self, const niso_str* store_names, size_t store_names_len, const char* mode, size_t mode_len, const niso_idb_transaction_options* options, niso_handle* out);
operation
undefined close();
int32_t niso_idb_database_close(niso_dom* dom, niso_handle self);
operation
[NisoGlue, NewObject] IDBObjectStore createObjectStore(DOMString name, optional IDBObjectStoreParameters options = {});
operation
undefined deleteObjectStore(DOMString name);
int32_t niso_idb_database_delete_object_store(niso_dom* dom, niso_handle self, const char* name, size_t name_len);
attribute
attribute EventHandler onabort;
int32_t niso_idb_database_get_onabort(niso_dom* dom, niso_handle self, void** out);
int32_t niso_idb_database_set_onabort(niso_dom* dom, niso_handle self, niso_event_handler_non_null_fn value_fn, void* value_userdata, niso_drop_fn value_drop);

Event handlers:

attribute
attribute EventHandler onclose;
int32_t niso_idb_database_get_onclose(niso_dom* dom, niso_handle self, void** out);
int32_t niso_idb_database_set_onclose(niso_dom* dom, niso_handle self, niso_event_handler_non_null_fn value_fn, void* value_userdata, niso_drop_fn value_drop);
attribute
attribute EventHandler onerror;
int32_t niso_idb_database_get_onerror(niso_dom* dom, niso_handle self, void** out);
int32_t niso_idb_database_set_onerror(niso_dom* dom, niso_handle self, niso_event_handler_non_null_fn value_fn, void* value_userdata, niso_drop_fn value_drop);
attribute
attribute EventHandler onversionchange;
int32_t niso_idb_database_get_onversionchange(niso_dom* dom, niso_handle self, void** out);
int32_t niso_idb_database_set_onversionchange(niso_dom* dom, niso_handle self, niso_event_handler_non_null_fn value_fn, void* value_userdata, niso_drop_fn value_drop);
operation not in JS
[NisoInternal] IDBObjectStore createStore(DOMString name, any keyPath, boolean autoIncrement);
int32_t niso_idb_database_create_store(niso_dom* dom, niso_handle self, const char* name, size_t name_len, const uint8_t* key_path, size_t key_path_len, bool auto_increment, niso_handle* out);

createObjectStore’s steps after its options are converted.

Members the web has, by the BCD keys web-features 3.45.0 lists, that idl/ doesn’t declare. The list is partial: web-features lists only the keys it maps to a feature.

  • worker_support (IndexedDB)