Event Forage
Utility for localforage that emits events when keys in the store are set or removed.
Usage
var localforage = localforage localforage localforage localforage localforage // Start using the store ------------------------------------------------------ localforage localforage localforageclear { console} // Output --------------------------------------------------------------------- /*setItem callbackset:test fooset test fooremoveItem callbackremove:testremove testclear callbackclear*/
Events
set
Emitted after any key has been set in the store. Handler receives key
and value
params.
set:<key name>
Emitted after a key has been set in the store. Handler receives value
param.
remove
Emitted after any key has been removed from the store. Handler receives key
param.
remove:<key name>
Emitted after a key has been removed from the store. Handler receives no parameters.
clear
Emitted after the store has been cleared. Handler receives no parameters.