sessionStorage.js 396 B

12345678910111213
  1. angular.module('sessionStorage', []).value('sessionStorage', function(...args) {
  2. /*
  3. sessionStorage can throw browser exceptions, for example if it is full
  4. We don't use sessionStorage for anything critical, on in that case just
  5. fail gracefully.
  6. */
  7. try {
  8. return $.sessionStorage(...args)
  9. } catch (e) {
  10. console.error('sessionStorage exception', e)
  11. return null
  12. }
  13. })