简体   繁体   English

是否可以在Adobe AIR中使用localStorage和window.openDatabase?

[英]Is it possible to use localStorage and window.openDatabase in Adobe AIR?

I have a working offline application ( .html + .js ). 我有一个有效的离线应用程序( .html + .js )。 It uses localStorage and an SQLite database accessed using the openDatabase method. 它使用localStorage和使用openDatabase方法访问的SQLite数据库。 however, when I try to convert this to Adobe AIR using the Adobe Air Debug Launcher, it does not seem to work. 但是,当我尝试使用Adobe Air Debug Launcher将其转换为Adobe AIR时,它似乎不起作用。

I also get the following errors from command line: 我还从命令行获得以下错误:

"ReferenceError: Can't find variable: localStorage"

Is Adobe AIR not HTML5 compliant? Adobe AIR不符合HTML5吗? If it's not supporting localStorage and openDatabase() - is it possible to just include another JS file to fix this? 如果它不支持localStorageopenDatabase() - 是否可以只包含另一个JS文件来解决这个问题?

My concern is that I want the application to work in the Google Chrome browser and Adobe AIR without having to make a lot of rewrites. 我担心的是,我希望该应用程序能够在Google Chrome浏览器和Adobe AIR中运行,而无需进行大量重写。

Adobe AIR doesn't support Web Storage, as it has its own local storage engine through the class flash.data.EncryptedLocalStore ( docs ). Adobe AIR不支持Web存储,因为它通过类flash.data.EncryptedLocalStoredocs )拥有自己的本地存储引擎。

Take a look on this article to a tutorial . 看看这篇文章的教程

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM