mirror of
https://github.com/apache/cordova-android.git
synced 2026-04-23 00:00:09 +08:00
javascript and native side of a URL caching plugin + android plugin framework is complete
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
PhoneGap.addPlugin = function(name, obj) {
|
||||
if ( !window.plugins ) {
|
||||
window.plugins = {};
|
||||
}
|
||||
|
||||
if ( !window.plugins[name] ) {
|
||||
window.plugins[name] = obj;
|
||||
}
|
||||
}
|
||||
|
||||
function Cache() {
|
||||
}
|
||||
|
||||
Cache.prototype.getCachedPathForURI = function(uri, success, fail) {
|
||||
PhoneGap.execAsync(success, fail, 'com.phonegap.api.impl.Cache', 'getCachedPathForURI', [uri]);
|
||||
};
|
||||
|
||||
PhoneGap.addPlugin('cache', new Cache());
|
||||
Reference in New Issue
Block a user