-
Notifications
You must be signed in to change notification settings - Fork 37
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for storage area onChanged event listeners #129
Conversation
Codecov ReportBase: 99.50% // Head: 99.57% // Increases project coverage by
Additional details and impacted files@@ Coverage Diff @@
## main #129 +/- ##
==========================================
+ Coverage 99.50% 99.57% +0.07%
==========================================
Files 14 12 -2
Lines 201 237 +36
Branches 43 48 +5
==========================================
+ Hits 200 236 +36
Misses 1 1
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
Noticed just now that this seems to be a Chrome specific thing and does not work with Firefox extensions. Is this something that's still relevant for this project? Otherwise this PR can be closed |
While we don't have any decent way to categorize these differences I don't see a reason we can't implement Chrome or Firefox only APIs. |
Can someone look at this PR? Looking for the support this code would provide. |
Aside from the onChanged events on the storage namespace, each storage area (sync, local and managed) have their own onChanged event. This event is tied to the area and as such, it has a different callback function signature that only provides an object mapping with the relevant StorageChange(s). References: https://developer.chrome.com/apps/storage#type-StorageArea https://chromium.googlesource.com/chromium/src/+/master/extensions/common/api/storage.json#152
a784e56
to
d53db65
Compare
rebasing but this likely requires a lot more attention |
Aside from the onChanged events on the storage namespace, each storage
area (sync, local and managed) have their own onChanged event. This
event is tied to the area and as such, it has a different callback
function signature that only provides an object mapping with the
relevant StorageChange(s).
References:
https://developer.chrome.com/apps/storage#type-StorageArea
https://chromium.googlesource.com/chromium/src/+/master/extensions/common/api/storage.json#152