clear method

Removes all data from an object store.

Internet Explorer 10



var retVal = IDBObjectStore.clear();


This method has no parameters.

Return value

Type: IDBRequest

A request representing the results to clear the data.


This method can throw the following DOMException exceptions:

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.
Exception propertiesCondition
name: InvalidStateError
code: DOMException.INVALID_STATE_ERR (11)

The update is not allowed for one of the following reasons: the cursor was created using openKeyCursor, the cursor is iterating to a new record, or the cursor has moved past the last record.

name: ReadOnlyError

The associated transaction is read-only.

name: TransactionInactiveError

The associated transaction has closed or is not active.


Standards information

See also