Open bahrus opened 5 years ago
This API is layered on top of IndexedDB, so it would itself use IndexedDB observers to implement such a feature. That wouldn't change your vendor adoption woes. (In general, asking for more things to be implemented is not a generally effective way of getting existing things implemented faster ;).)
That said, the general idea of providing an observer for async local storage---perhaps like sync local storage's StorageEvent---seems worth tracking as a future addition, after the initial API gets some usage. So let's leave this open to track that.
IndexedDB Observers seems like a really useful feature -- it would provide a more robust version of postMessage -- if an iframe or tab gets loaded after a postMessage event happened, the iframe can't get what the value was, whereas IndexedDB + IndexedDB Observers could be a really powerful way of passing data to other iframes (or tabs?), regardless of the order they load.
But vendor adoption seems quite slow. Could this api provide similar observers, perhaps tied to a specific key?