You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
/** * Clear one object store * * @param {String} objStoreName name of object store * @return {Promise} */constconn=awaitsklad.open('dbName');try{awaitconn.clear('objStoreName');}catch(err){// check err.name to get the reason of error// err.message will also be usefulthrownewError(err.message);}/** * Clear multiple object stores (during one transaction) * * @param {Array} objStoreNames * @return {Promise} * @param {DOMError} err */constconn=awaitsklad.open('dbName');try{awaitconn.clear(['objStoreName_1','objStoreName_2','objStoreName_3']);}catch(err){// check err.name to get the reason of error// err.message will also be usefulthrownewError(err.message);}
Important notes
Check out clear() tests to see expected behaviour of this method.