I’m writing a browser extension. In the service worker console, I practiced working with indexdb. I use a standard template to create a store, but nothing happens. The IndexDB Application section remains empty.
let db
let request = indexedDB.open("test_db");
request.onupgradeneeded = function (event) {
db = event.target.result;
db.createObjectStore('books', {keyPath: 'id'});
}
request.onerror = function (event) {
console.error("Why didn't you allow my web app to use IndexedDB?!");
}
request.onsuccess = function (event) {
db = event.target.result;
}
As you can understand, the Manifest version is 3.
Browser information:
Chromium: 112.0.5615.49 Built on Ubuntu , running on Ubuntu 18.04 (32 bit)
JavaScript: V8 11.2.214.9
I checked the operation of the code on the browser pages and the code works.
Permissions for using storage are written in the manifest.