* SUMMARY Modern IDB: Backend should send events when DBs / ObjectStores are created/deleted This serves multiple purposes: (1) under modern IDB there doesn't exist a way to get a list of all the IDB names (we could create one for Inspector eventually) (2) currently when a page opens an IDB, it should show up in the tools but doesn't. An event would solve that. This primarily solves (2) which is a better user experience (dynamically updating available IDB databases/stores). (1) Should be solved eventually but can be done separately.
<rdar://problem/24115467>
A basic set of events could include: "events": [ { "name": "databaseOpened", "parameters": [ { "name": "databaseWithObjectStores", "$ref": "DatabaseWithObjectStores", "description": "Database with an array of object stores." } ] }, { "name": "databaseDeleted", "parameters": [ { "name": "securityOrigin", "type": "string", "description": "Security origin." }, { "name": "databaseName", "type": "string", "description": "Database name." } ] }, { "name": "objectStoreCreated", "parameters": [ { "name": "securityOrigin", "type": "string", "description": "Security origin." }, { "name": "databaseName", "type": "string", "description": "Database name." } { "name": "name", "type": "string", "description": "Object store name." }, ] }, { "name": "objectStoreDeleted", "parameters": [ { "name": "securityOrigin", "type": "string", "description": "Security origin." }, { "name": "databaseName", "type": "string", "description": "Database name." } { "name": "name", "type": "string", "description": "Object store name." }, ] }, ] But it might also be worthwhile now to introduce a "databaseId" for securityOrigin/databaseName pairs. Other possible improvements: - Send update event when a Database changes version? - Send update event when an ObjectStore is modified?
Since object stores can only be created/deleted/modified in upgrades that simplifies things. We would not need objectStoreCreated/Delete events, just a databaseOpened (which could also double for updated) and databaseDeleted, at that point the object stores should be solid.
Even if we did this, we would still want a way for the inspector to get a list of all the open IndexedDBs when the inspector opens... So I think it would still make sense for WebCore provide a way to do that in some way.
Reversing the blocking relationship here - We don't need this to consider Modern IDB to be complete.