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

来源:互联网 发布:巴黎高等商学院 知乎 编辑:程序博客网 时间:2024/05/18 13:27

官方原版答案是:
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
当再次打开系统时,该函数就会被执行。

0 0
原创粉丝点击