Skip to content
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

Closed
wants to merge 1 commit into from

Conversation

pinn3
Copy link

@pinn3 pinn3 commented Nov 14, 2020

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

@codecov
Copy link

codecov bot commented Nov 14, 2020

Codecov Report

Base: 99.50% // Head: 99.57% // Increases project coverage by +0.07% 🎉

Coverage data is based on head (a784e56) compared to base (09d3829).
Patch coverage: 100.00% of modified lines in pull request are covered.

❗ Current head a784e56 differs from pull request most recent head d53db65. Consider uploading reports for the commit d53db65 to get more accurate results

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              
Impacted Files Coverage Δ
src/storage.js 100.00% <100.00%> (ø)
src/index.js 100.00% <0.00%> (ø)
src/runtime.js 100.00% <0.00%> (ø)
src/extension.js
src/downloads.js

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.
📢 Do you have feedback about the report comment? Let us know in this issue.

@pinn3
Copy link
Author

pinn3 commented Nov 14, 2020

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

@clarkbw
Copy link
Owner

clarkbw commented Jul 19, 2021

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.

cainaj
cainaj previously approved these changes Oct 27, 2022
@cainaj
Copy link

cainaj commented Oct 27, 2022

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
@clarkbw clarkbw force-pushed the storage-area-on-changed-listeners branch from a784e56 to d53db65 Compare November 1, 2022 15:43
@clarkbw
Copy link
Owner

clarkbw commented Nov 1, 2022

Can someone look at this PR? Looking for the support this code would provide.

rebasing but this likely requires a lot more attention

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants