MCPcopy Create free account
hub / github.com/openscopeproject/InteractiveHtmlBom / initStorage

Function initStorage

InteractiveHtmlBom/web/util.js:7–22  ·  view source on GitHub ↗
(key)

Source from the content-addressed store, hash-verified

5var storage;
6
7function initStorage(key) {
8 try {
9 window.localStorage.getItem("blank");
10 storage = window.localStorage;
11 } catch (e) {
12 // localStorage not available
13 }
14 if (!storage) {
15 try {
16 window.sessionStorage.getItem("blank");
17 storage = window.sessionStorage;
18 } catch (e) {
19 // sessionStorage also not available
20 }
21 }
22}
23
24function readStorage(key) {
25 if (storage) {

Callers 1

ibom.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected