indexedDB未定义 [英] indexedDB is undefined

查看:138
本文介绍了indexedDB未定义的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


我的代码中包含以下代码: home.js  文件
在使用"导航应用程序"构建的Windows Phone 8应用程序中Visual Studio模板。



为什么我收到"indexedDB未定义"?使用以下内容时出现异常:

   WinJS   UI    Pages    define   " /pages/home/home.html"    {  
ready
function element options {
createDB
();
}
});

function createDB () {
var openRequest = indexedDB 打开 " BookDB" < span class ="pln"style ="margin:0px; padding:0px; border:0px; vertical-align:baseline; background:transparent">
1 );
}



据我所知,从文档和此微软样本(http://code.msdn.microsoft.com/windowsapps/IndexedDB-sample-eb1e95af/sourcecode?fileId = 58002& pathId = 660123857),这应该可行。

解决方案

我在VS2013中没有看到Windows Phone导航应用程序。我错过了什么?

I have the following code in my home.js file in a Windows Phone 8 app built using the "Navigation App" Visual Studio template.

Why do I receive an "indexedDB is undefined" exception when using the following:

WinJS.UI.Pages.define("/pages/home/home.html", {
    ready: function (element, options) {    
        createDB();
   }
 });

function createDB() {
     var openRequest = indexedDB.open("BookDB", 1);
}

As far as I can tell from the documentation and this Microsoft sample (http://code.msdn.microsoft.com/windowsapps/IndexedDB-sample-eb1e95af/sourcecode?fileId=58002&pathId=660123857), this should work.

解决方案

I don't see a Windows Phone Navigation app in VS2013. What am I missing?


这篇关于indexedDB未定义的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆