This page is In Progress

Notice: The WebPlatform project, supported by various stewards between 2012 and 2015, has been discontinued. This site is now available on github.

put

Summary

Creates a structured clone of the value parameter.

Method of apis/indexeddb/IDBObjectStoreapis/indexeddb/IDBObjectStore

Syntax

var object = object.put(value, key);

Parameters

value

Data-type
Blob

An object literal containing the values to be stored in the object store.

key

Data-type
Blob

The key value of the new record.

Return Value

Returns an object of type DOM NodeDOM Node

Notes

Remarks

This method can throw the following DOMException exceptions:

Exception properties Description

name: DataCloneError
code: DOMException.DATA_CLONE_ERR (25)
The data could not be saved to the object store.

name: DataError
The specified key value is invalid or the value specified for an indexed attribute is invalid.

name: InvalidStateError
code: DOMException.INVALID_STATE_ERR (11)
The object store has been deleted or is otherwise unavailable.

name: ReadOnlyError
The associated transaction is read-only.

name: TransactionInactiveError
The associated transaction is not active.

Note As of Internet Explorer 10, the code property is deprecated in favor of the name property, which is preferred for standards compliance and future compatibility.

Syntax

Standards information

Attributions