Skip to content
This repository has been archived by the owner on Oct 1, 2018. It is now read-only.

Commit

Permalink
Updated JS module to accept object with options instead of only headers.
Browse files Browse the repository at this point in the history
  • Loading branch information
nikDemyankov committed May 9, 2016
1 parent 41e08db commit f44d362
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions www/chcp.js
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,11 @@ var chcp = {
},

/**
* DEPRECATED! WILL BE REMOVED EVENTUALLY!
*
* If you want to set config-url - use chcp.fetchUpdate(callback, options).
* If you want to set auto-download/auto-install preference - do it in config.xml instead of this method.
*
* Set plugin options.
* Options are send to the native side.
* As soon as they are processed - callback is called.
Expand Down Expand Up @@ -232,10 +237,10 @@ var chcp = {
* Usually this is done automatically by the plugin, but can be triggered at any time from the web page.
*
* @param {Callback(error, data)} callback - called when native side finished update process
* @param headers - provide optional headers object. This will be used to configure server request
* @param {Object} options - additional options, such as "config-url" and additional http headers.
*/
fetchUpdate: function(callback, headers) {
callNativeMethod(pluginNativeMethod.FETCH_UPDATE, headers, callback);
fetchUpdate: function(callback, options) {
callNativeMethod(pluginNativeMethod.FETCH_UPDATE, options, callback);
},

/**
Expand Down

0 comments on commit f44d362

Please sign in to comment.