我在Safari(私有窗口)和iOS上的iframe中遇到了IDBWrapper功能的问题。 错误讯息:
TypeError:null不是对象(评估'a')。
在其他浏览器和设备中,一切运行良好。
我使用过IDBWrapper 1.6.0版本。在最新版本(1.7.1)中,我遇到了同样的问题。
我该如何解决这个问题?你有什么建议吗? 请查看下面的简单代码示例:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Test</title>
<script src="https://cdnjs.cloudflare.com/ajax/libs/idbwrapper/1.6.0/idbstore.min.js"></script>
<script src="script.js"></script>
</head>
<body>
<h1>Test</h1>
</body>
</html>
-
var customers = new IDBStore({
dbVersion: 1,
storeName: 'customer',
keyPath: 'id',
autoIncrement: true,
onStoreReady: function(){
console.log('Store ready!');
}
});
您可以在此页面上查看:https://gist.github.com/jensarps/1391434#file-index-html
谢谢!