-
Notifications
You must be signed in to change notification settings - Fork 0
/
NavigatorStorage.cljs
33 lines (24 loc) · 1.06 KB
/
NavigatorStorage.cljs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
(ns web.storage.NavigatorStorage
"The NavigatorStorage mixin adds to the `web.performance.Navigator`
`web.workers.WorkerNavigator` interfaces the `Navigator.storage`
which provides access to the `web.storage.StorageManager` singleton
for controlling the persistence of data stores as well as obtaining"
(:refer-clojure :exclude []))
(defn storage
"Property.
The NavigatorStorage.storage read-only property returns the singleton
object used to access the overall storage capabilities of the
for the current site or app.
`var storageManager = navigator.storage;`
See also: `https://developer.mozilla.org/en-US/docs/Web/API/NavigatorStorage/storage`"
[this]
(-> this (.-storage)))
(defn set-storage!
"Property.
The NavigatorStorage.storage read-only property returns the singleton
object used to access the overall storage capabilities of the
for the current site or app.
`var storageManager = navigator.storage;`
See also: `https://developer.mozilla.org/en-US/docs/Web/API/NavigatorStorage/storage`"
[this val]
(aset this "storage" val))