-
Notifications
You must be signed in to change notification settings - Fork 74
Closed
Labels
implemented: chromeImplemented in ChromeImplemented in Chromeimplemented: edgeImplemented in EdgeImplemented in Edgeimplemented: firefoxImplemented in FirefoxImplemented in Firefoximplemented: safariImplemented in SafariImplemented in Safari
Description
Taken from #505, as an alternative proposal suggested by @tophf and @Rob--W. It's significantly different from my original proposal, so I'm creating a separate proposal for it.
Background
I regularly need to use storage keys that involve dynamic elements like flag:[tabId]. The only way to get all keys starting with the prefix flag: is using StorageArea.get() to get all the storage items and then to filter.
This isn't efficient. The storage areas support 10MB of data and even more with the unlimitedStorage permission. That's potentially a huge amount of storage data that needs to be serialized and sent over. There's also a special concern when using the Sync storage area.
Proposal
A method to get all keys without the corresponding values.
browser.storage.local.getAllKeys(): Promise<string[]> Resources
xeenon, carlosjeurissen, fregante, kiaraarose, Juraj-Masiar and 1 more
Metadata
Metadata
Assignees
Labels
implemented: chromeImplemented in ChromeImplemented in Chromeimplemented: edgeImplemented in EdgeImplemented in Edgeimplemented: firefoxImplemented in FirefoxImplemented in Firefoximplemented: safariImplemented in SafariImplemented in Safari