I think a spec that is way more pertinent to Cordova for solving this problem (and also many others) is the config.xml spec. Anis pointed out the <access> element. WebWorks already uses a config.xml file as a base for defining application metadata and configuration. So does PhoneGap Build. Tons of goodies in there that we can use on top of caching and server whitelisting, such as:
- icon definitions (<icon> element) - generic preference/configuration elements (<preference>). I believe phonegap build uses this for things such as locking orientation in an app. Basically anything in phonegap.xml can be mapped to <preference> elements. - <feature> element. *VERY* pertinent to defining which APIs you want your app to access. Essentially could replace plugins.xml in cordova currently. - <author>, <title>, <license>, <description> elements... - free localization of strings (such as titles) as well as content by piggybacking on xml:lang attributes for different elements. - application entry point (entry page) definitions (<content>) - finally, there is a <param> element that is a key:value pair. We could map anything to this... PhoneGap Build extended the config.xml elements with a splash screen (<splash>) element as well. The possibilities are endless, and we have a pretty complete spec. Also for icing on the cake, Michael Brooks and I are involved with the W3C community group related to the widget spec so we already have ins to present feedback and iterate on the spec if necessary.