JavaScript

{dialog.object}idbDeleteItem Method

Syntax

{dialog.object}.idbDeleteItem(itemName [,onSuccess [,onError]])

Arguments

itemNamestring

The item to delete from IndexedDB.

onSuccessfunction

A JavaScript function to call when the operation succeeds.

onErrorfunction

A JavaScript function to call when the operation fails. The onError function is passed a parameter, err, which contains more information about the error.

Description

Deletes an item from IndexedDB.

Discussion

The idbDeleteItem() method deletes an item from IndexedDB.

Example

if ({dialog.object}.idbAvailable()) {
    var itemName = 'key1';
    var onSuccess = function() { alert('item was deleted'); };
    var onError = function(err) { alert('item was not deleted'); };
    {dialog.Object}.idbDeleteItem(itemName, onSuccess, onError);
}

See Also