Allow aborting deletion in onDelete event.

See issue #151 and #224.