Table.hook('deleting')
Syntax
db.[tableName].hook('deleting', function (primKey, obj, transaction) {
// You may do additional database operations using given transaction object.
// You may set this.onsuccess = callback when delete operation completes.
// You may set this.onerror = callback if delete operation fails.
// Any modification to obj is ignored.
// Any return value is ignored.
// throwing exception will make the db operation fail.
});Parameters
primKey
The primary key of the object being deleted
Return Value
To Unsubscribe
db.[tableName].hook('deleting').unsubscribe(yourListenerFunction)