-
Notifications
You must be signed in to change notification settings - Fork 319
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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
- Loading branch information
Showing
1 changed file
with
35 additions
and
46 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters