“Contoh Chrome.Storage.Local.Remove” Kode Jawaban

Contoh Chrome.Storage.Local.Remove

// Completely clear the storage. All items are removed.
chrome.storage.local.clear(() => {
    console.log('Everything was removed');
});

// Remove items under a certain key
const key = 'myKey';
chrome.storage.local.remove([key], (result) => {
  console.log('Removed items for the key: ' + key);
});
Shadow

chrome.storage.local delete

chrome.storage.local.remove(["Key1","key2"],function(){
 var error = chrome.runtime.lastError;
    if (error) {
        console.error(error);
    }
})
Shadow

Jawaban yang mirip dengan “Contoh Chrome.Storage.Local.Remove”

Pertanyaan yang mirip dengan “Contoh Chrome.Storage.Local.Remove”

Jelajahi jawaban kode populer menurut bahasa

Jelajahi bahasa kode lainnya