1
0
Fork 0
firefox/toolkit/components/extensions/test/mochitest/file_indexedDB.html
Daniel Baumann 5e9a113729
Adding upstream version 140.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
2025-06-25 09:37:52 +02:00

28 lines
641 B
HTML

<!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>