Skip to content
This repository was archived by the owner on Nov 4, 2024. It is now read-only.
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion dev/Storage/RainLoop.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,13 @@ const TIME_KEY = '__rlT';
*/
export function isStorageSupported(storageName)
{
if (storageName in window && window[storageName] && window[storageName].setItem)
let storageIsAvailable = false;
try {
storageIsAvailable = storageName in window && window[storageName] && window[storageName].setItem;
}
catch(e) {} // at: window[storageName] firefox throws SecurityError: The operation is insecure. when in iframe

if (storageIsAvailable)
{
const
s = window[storageName],
Expand All @@ -28,6 +34,7 @@ export function isStorageSupported(storageName)
catch (e) {} // eslint-disable-line no-empty
}


return false;
}

Expand Down