Existence of the localStorage API was probed so far by creating (and immediately deleting) a localStorage-entry. This is undesirable behaviour in case a page wishes to not have the localStorage-API utilized in any way.
This PR introduces the following changes:
Determine existence of the localStorage-API by checking if getItem and setItem functions are available instead of setting a storage item
Handle exceptions directly in the getItem/setItem wrapper functions (e.g. if access is denied or quota got exceeded)
Anyways, a localStorage item would still be set if certain feature of the player-UI are used. PR is a followup to introduce disabling of localStorage.
Description
Existence of the
localStorage
API was probed so far by creating (and immediately deleting) alocalStorage
-entry. This is undesirable behaviour in case a page wishes to not have thelocalStorage
-API utilized in any way.This PR introduces the following changes:
localStorage
-API by checking ifgetItem
andsetItem
functions are available instead of setting a storage itemgetItem
/setItem
wrapper functions (e.g. if access is denied or quota got exceeded)Anyways, a is a followup to introduce disabling of
localStorage
item would still be set if certain feature of the player-UI are used. PRlocalStorage
.Checklist (for PR submitter and reviewers)
CHANGELOG
entry