Beta Android Support

This commit is contained in:
Sebastián Katzer
2013-08-23 23:54:04 +02:00
parent 3d9aa7b9d5
commit a27f5a9e0f
4 changed files with 308 additions and 5 deletions

View File

@@ -36,9 +36,11 @@ Printer.prototype = {
* @param {String} content HTML string or DOM node (if latter, innerHTML is used to get the contents)
* @param {Function?} callback callback function called if print is completed. {success: bool, available: bool, error: reason}
* @param {Object?} scope callback scope (default: window)
* @param {Object?} options platform specific options
*/
print: function (content, callback, scope) {
var page = content.innerHTML || content,
print: function (content, callback, scope, options) {
var page = content.innerHTML || content,
options = options || {},
callbackFn;
if (typeof page != 'string') {
@@ -54,7 +56,7 @@ Printer.prototype = {
}
}
cordova.exec(callbackFn, null, 'Printer', 'print', [page]);
cordova.exec(callbackFn, null, 'Printer', 'print', [page, options]);
}
};