您的位置:首页 > 移动开发

Extjs中app.js文件中的onUpdated函数什么时候执行

2016-09-18 16:00 423 查看
官方原版答案是:

As a short explanation: ‘onUpdated’ is triggered after either, or both of the following cases happen:

Your application’s HTML 5 manifest file (cache.manifest) changes. Read more on HTML 5 app cache if you’re new to this feature. Since cache.manifest is generated automatically, it contains the checksum values of all managed assets. As you modify the content of index.html file or any other file listed in the ‘appCache’ config inside app.json, their checksum values change -> the content of cache.manifest changes.

You have changes in any of your JavaScript or CSS assets listed in the “js” and “css” config inside app.json. Similarly to cache.manifest, when you build your application for production, a production version of app.json is generated automatically. This file contains checksums for all assets. By comparing the latest checksum values with the ones locally stored inside Local Storage, the app knows exactly what file has changed, and pull down the delta for that item, then patch its local copy to make it identical to the latest one.

经过亲自测试后发现:

如果更改了app.json中列出的文件,例如index.html,然后重新sencha app build

当再次打开系统时,该函数就会被执行。
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  extjs