Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove session storage checks from accordion JavaScript #5044

Merged
merged 2 commits into from
Jun 11, 2024

Commits on Jun 11, 2024

  1. Remove check for session storage support

    We don’t do anything different if we detect the browser doesn’t support session storage, so we don’t really care.
    
    We do need to wrap attempts to set *or get* from sessions storage in try blocks because setItem can throw `QuotaExceededError` exceptions [1] and some older browsers will throw other exceptions if session storage isn’t available (disabled, or using private browsing) [2] [3]
    
    However we don’t need to do anything different if exceptions are thrown – we can safely catch those exceptions and swallow them.
    
    [1]: https://html.spec.whatwg.org/multipage/webstorage.html#dom-storage-setitem
    [2]: https://developer.mozilla.org/en-US/docs/Web/API/Web_Storage_API/Using_the_Web_Storage_API#feature-detecting_localstorage
    [3]: https://gist.github.com/paulirish/5558557
    36degrees committed Jun 11, 2024
    Configuration menu
    Copy the full SHA
    a9ffec4 View commit details
    Browse the repository at this point in the history
  2. Document in CHANGELOG

    36degrees committed Jun 11, 2024
    Configuration menu
    Copy the full SHA
    df11d0b View commit details
    Browse the repository at this point in the history