(store: KeyValueStore, level: DepthLevel)
| 67 | * about it would be making the reader's privacy setting into a fault. |
| 68 | */ |
| 69 | export function writeReaderLevel(store: KeyValueStore, level: DepthLevel): void { |
| 70 | try { |
| 71 | store.setItem(READER_LEVEL_KEY, String(level)); |
| 72 | } catch { |
| 73 | // Nothing to do and nothing to say: the level still holds for this session. |
| 74 | } |
| 75 | } |
| 76 | |
| 77 | /** The browser's own storage, when this build is running in one. */ |
| 78 | export function browserStore(): KeyValueStore | undefined { |
no test coverage detected