//-------------------------------------------------------------------------
/**
*local Store module
* 以下是local Server模块的应用函数
*/
var localServer;
var STORE_NAME = 'test_store';
var store;
var MANIFEST_FILENAME = 'my_manifest.json';
/**
* setOffline
* 此方法用于页面显示,当用户点击时被调用
*
*/
function setOffline() {
//使页面显示离线应用有效
setShowStatus(1);
//打开本地资源存储并捕获网络资源
openLocalStore();
capture();
}
/**
* openLocalStore
* 该方法用于内部
* 创建local server,并打开local store
*/
function openLocalStore() {
if (window.google && google.gears) {
try {
//创建local server
localServer =
google.gears.factory.create('beta.localserver', '1.0');