isSessionStorageEnabled
Checks if sessionStorage
is enabled.
- Use a
try...catch
block to returntrue
if all operations complete successfully,false
otherwise. - Use
Storage.setItem()
andStorage.removeItem()
to test storing and deleting a value inwindow.sessionStorage
.