blob: ce4b96f07913340fd3afe5812b52dcd5daf560ba (
plain)
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
|
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<script>
"use strict";
const objectStoreName = "Objects";
let test = {key: 0, value: "test"};
let request = indexedDB.open("WebExtensionTest", 1);
request.onupgradeneeded = event => {
let db = event.target.result;
let objectStore = db.createObjectStore(objectStoreName,
{autoIncrement: 0});
request = objectStore.add(test.value, test.key);
request.onsuccess = () => {
db.close();
window.postMessage("indexedDBCreated", "*");
};
};
</script>
</head>
<body>
This is a test page.
</body>
<html>
|