javascript - 索引数据库在歌剧、野生动物园中不起作用
问题描述
if (!("indexedDB" in window)) {
console.warn("IndexedDB not supported");
return;
}
log("db created ",data.product_detail)
const dbName = "gt_form";
const storeName = "product_store";
const version = 1; //versions start at 1
const db = await openDB(dbName, version, {
upgrade(db, oldVersion, newVersion, transaction) {
const store = db.createObjectStore(storeName);
}
});
const tx = await db.transaction(storeName, "readwrite");
const store = await tx.objectStore(storeName);
它在 mozila 和 chrome 上运行良好,但不知道为什么浏览器的其余部分也不支持 ven chrome 隐身模式
解决方案
推荐阅读
- java - 如果用户跳过输入,则使用默认值
- javascript - 如何创建一个具有未知数量的字符串属性和一个具有数字类型的特定属性的接口?
- ios - 每 X 分钟将位置更新到服务器 iOS
- json - 我是否必须为纯 Web 应用程序清理 JSON 输入?
- android - 从对象列表中保存/加载首选项的问题
- javascript - 是否有一种简单易用的方法来使用 fetch 通过 api 接收文件
- python - 如何在不打开第一帧的情况下打开第二帧
- javascript - 在 EJS 中显示部分搜索到的 mongodb 文档
- linux - WSL PATH 包含 windows 目录,如何(优雅地)修复它以仅排除某些目录?
- django - _MultiThreadedRendezvous 使用 for 循环时的对象时间延迟