Answers for "localstorage try catch"

0

localstorage try catch

try {
  localStorage.setItem(key, value);
} catch(e) {
  if (e.code == 22) {
    // Storage full, maybe notify user or do some clean-up
  }
}
Posted by: Guest on January-16-2021

Code answers related to "Javascript"

Browse Popular Code Answers by Language