mirror of
https://github.com/apache/cordova-android.git
synced 2025-02-27 04:42:51 +08:00
18 lines
397 B
JavaScript
18 lines
397 B
JavaScript
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()); |