1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | 2x 2x 2x 2x 2x | function checkSupportStorage (storage) {
try {
let x = '__storage_test__';
storage.setItem(x, x);
storage.removeItem(x);
return true;
} catch (e) {
return false;
}
}
export default {
checkSupportStorage: checkSupportStorage
};
|