Override Chrome Storage API
问题 I would like to override chrome.storage.local.set in order to log the value of a storage key when the Chrome Storage API is called: var storage_local_set = chrome.storage.local.set; chrome.storage.local.set = function(key, value) { console.log(key); storage_local_set(key); } But I get Illegal invocation: Function must be called on an object of type StorageArea when storage_local_set(key) gets called. How can I store the data after logging the key? For chrome.storage.sync.set this is what I