You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What specific section or headline is this issue about?
changes
What information was incorrect, unhelpful, or incomplete?
Due to extension bug reports, I had to test the output of onChanged and I found out that there are conflicting information on MDN which led to the issue.
object. Object describing the change. This object contains properties for all the keys in the storage area included in the storageArea.set call, even if key values are unchanged.
object. Object describing the change. This contains one property for each key that changed. The name of the property is the name of the key that changed, and its value is a storage.StorageChange object describing the change to that item.
First one says: "all the keys in the storage area, even if key values are unchanged"
Second one says: "one property for each key that changed."
After further testing both APIs storage.onChanged & storage.sync.onChanged:
Firefox onChanged returns all the keys in the storage area, even if all values are unchanged
Chrome onChanged returns only the changed values (event doesn't fire when there is no change)
What did you expect to see?
no conflicting information
Do you have any supporting links, references, or citations?
@erosman from your testing, did you determine whether the statement that "When this event is triggered by storageArea.set, it's possible to receive a callback when there is no change to the underlying data." is still correct? Do you get a call back with an empty object if there are no changes?
@rebloor After further testing, I had to correct & update the test results.
The issue can now be summarised as:
Confusing text for the 2 APIs
Inconsistency between Chrome & Firefox implementations
rebloor
added
p2
Minor issue with low priority, can be fixed later.
and removed
needs triage
Triage needed by staff and/or partners. Automatically applied when an issue is opened.
labels
Mar 3, 2024
MDN URL
https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/API/storage/onChanged
What specific section or headline is this issue about?
changes
What information was incorrect, unhelpful, or incomplete?
Due to extension bug reports, I had to test the output of
onChanged
and I found out that there are conflicting information on MDN which led to the issue.First one says: "all the keys in the storage area, even if key values are unchanged"
Second one says: "one property for each key that changed."
After further testing both APIs
storage.onChanged
&storage.sync.onChanged
:onChanged
returns all the keys in the storage area, even if all values are unchangedonChanged
returns only the changed values (event doesn't fire when there is no change)What did you expect to see?
no conflicting information
Do you have any supporting links, references, or citations?
No response
Do you have anything more you want to share?
See also:
The text was updated successfully, but these errors were encountered: