我在 Firefox 版本 14-16 中打开没有 HTTP 协议的文件。
我无法打开indexdb
. 我的语法是这样的:
window.indexedDB = window.indexedDB || window.webkitIndexedDB || window.mozIndexedDB || window.msIndexedDB;
var IDBTransaction = window.IDBTransaction || window.webkitIDBTransaction;
var request = window.indexedDB.open(dbname, dbversion);
request.onsuccess = function (evt) {
alert('Success')
};
使用 Firebug,我可以window.mozIndexedDB
看到null
.
在 localhost 中它工作正常,但我需要在没有 HTTP 的情况下运行。
是否需要对我的代码进行任何更改?