Open erosman opened 6 months ago
This issue discusses the behavior of onChanged listener:
set()
an item, whether to compare its value has changed.remove()
an item, whether to compare the item already removed.clear()
, whether to compare the storage already empty.In addition, what is the behavior of storage.sync
when it syncs with the cloud (remote values)?
what is the behavior of storage.sync when it syncs with the cloud (remote values)
AFAIK the API considers the local copy (cache) to be fully representative of the remote state.
Adding consensus labels - everyone is in favor of only firing storage.onChanged
when there are changes in values. Firefox is the only one that sometimes fires onChanged despite there not being any changes. This issue is tracked at https://bugzilla.mozilla.org/show_bug.cgi?id=1833153
The other discrepancy in the original issue was if the event should fire with all values in the storage area, or just the changed ones. Given the current behaviour in Chrome is to only include the changed values, I'm reluctant to look at changing that unless there are strong reasons to do so.
Inconsistency: storage onChanged
I have comes across an inconsistency in the return of the storage
onChanged
event. (I am not aware of the return from other browsers.)Example:
Firefox
Chrome
See also: