OnChanged chrome storage - between extension background and popup

I would like to save the setting of my extension - changing its popup:

chrome.storage.local.set({'extension-status': 'on'}, function() {
    console.log('extension on status stored');
}

And get the update on my bakground page when changing this setting:

chrome.storage.onChanged.addListener(function(changes, namespace) {
     console.log("change recived!");
});

In the pop-up logs, I see the message "extension by status", but I DO NOT see the "changes received" in the background page logs.

How can I respond to changes to this saved object?

+4
source share

All Articles