-
Notifications
You must be signed in to change notification settings - Fork 0
/
deleteAllDatabase.html
37 lines (36 loc) · 1006 Bytes
/
deleteAllDatabase.html
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
33
34
35
36
37
<!DOCTYPE html>
<html lang="en">
<head>
<title></title>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link href="css/style.css" rel="stylesheet">
</head>
<body>
<script>
var dt = function () {
indexedDB.webkitGetDatabaseNames().onsuccess= function (e) {
e=e.target.result;
var i=0
console.log(e);
for (var key in e) {
dt.d(e[key],i++)
}
}
return
db.deleteAllCreatedDatabase().then(function (d) {
console.log(d);
})
}
dt.d= function (key,i) {
setTimeout(function () {
indexedDB.deleteDatabase(key).onsuccess= function (c) {
c=c.target.result
console.log(c);
}
}, 500*i);
}
dt()
</script>
</body>
</html>