-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Labels
enhancementNew feature or requestNew feature or request
Description
CRUD?
EventEmitter?
DB events
- "close": https://developer.mozilla.org/en-US/docs/Web/API/IDBDatabase/close_event
- "populate": first creation
- "ready": the open succeded (does it make sense with the explicit init?)
- "versionchange": the db is being updated elsewhere (usually inform user to save anything and tell them to reload)
Table events
Extra
Could we use BroadcastChannel, so that changes on any tab trigger hooks on every tab? It should be clear where the action actually takes place to do actual modifications rather than just listening in:
// Will trigger only if action in current tab
User.hook("beforeUpdate", async (element) => {
element.version += 1
})
// Will trigger on all tabs
User.hook("afterUpdate", async () => {
fetchUsers()
})Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request