undefined indexedDB on Windows Phone 8.1 javascript app

前端 未结 2 699
北荒
北荒 2021-01-21 21:39

I have the following code on a (HTML/javascript) Windows Store app

var reqOpen = window.indexedDB.open(that.dbName, that.dbVersion);

The thing

2条回答
  •  一整个雨季
    2021-01-21 22:21

    IndexedDB is not available on Windows Phone 8.1 HTML store apps.

    I wrote a SQLite for Windows Apps blog post which mentions this and describes how you might work around it: wrap up SQLite in WinRT and use that instead.

    The blog post is mostly about creating your own but it also links to some existing projects that do this and that might have acceptable licenses for you, including SQLite-WinRT.

    SQLite isn't necessarily your only option, but it is the only one I know of that is popular, has written VS extensions, and is actively supporting running in Windows store apps.

提交回复
热议问题