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

onChanged.addListener also exists on Storage Areas #3

Open
2 tasks
lachlanmcdonald opened this issue Jun 26, 2023 · 1 comment
Open
2 tasks

onChanged.addListener also exists on Storage Areas #3

lachlanmcdonald opened this issue Jun 26, 2023 · 1 comment
Assignees
Labels
Documentation Mismatch A mismatch between the available documentation and the existing implementation. Further Information Required The issue or pull request requires further information to proceed.

Comments

@lachlanmcdonald
Copy link
Owner

lachlanmcdonald commented Jun 26, 2023

The documentation states that onChanged exists on the storage object:

chrome.storage.onChanged.addListener(
  callback: function,
)

However, in @types/chrome, the onChanged event exists on each individual Storage Area:

declare namespace chrome.storage {
    export interface StorageArea {
        // ...
        onChanged: StorageAreaChangedEvent;
    }
}
  • Determine where onChanged is present.
  • Update the class as necessary.
@lachlanmcdonald lachlanmcdonald added Further Information Required The issue or pull request requires further information to proceed. Documentation Mismatch A mismatch between the available documentation and the existing implementation. labels Jun 26, 2023
@lachlanmcdonald lachlanmcdonald self-assigned this Jun 26, 2023
@lachlanmcdonald lachlanmcdonald changed the title onChanged.addListener does not exist on storage object as per documentation onChanged.addListener also exists on Storage Areas Jun 26, 2023
@lachlanmcdonald
Copy link
Owner Author

lachlanmcdonald commented Jun 26, 2023

It appears that the onChanged event can apply to a singular storage area (e.g. chrome.storage.local.onChanged), or across all available storage areas (i.e. chrome.storage.onChanged)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Documentation Mismatch A mismatch between the available documentation and the existing implementation. Further Information Required The issue or pull request requires further information to proceed.
Projects
None yet
Development

No branches or pull requests

1 participant