Fix webContents.print() (#17052)
This commit is contained in:
parent
944cdb4430
commit
1674388028
2 changed files with 2 additions and 2 deletions
|
@ -1458,7 +1458,7 @@ bool WebContents::IsCurrentlyAudible() {
|
||||||
|
|
||||||
#if BUILDFLAG(ENABLE_PRINTING)
|
#if BUILDFLAG(ENABLE_PRINTING)
|
||||||
void WebContents::Print(mate::Arguments* args) {
|
void WebContents::Print(mate::Arguments* args) {
|
||||||
bool silent, print_background = false;
|
bool silent = false, print_background = false;
|
||||||
base::string16 device_name;
|
base::string16 device_name;
|
||||||
mate::Dictionary options = mate::Dictionary::CreateEmpty(args->isolate());
|
mate::Dictionary options = mate::Dictionary::CreateEmpty(args->isolate());
|
||||||
base::DictionaryValue settings;
|
base::DictionaryValue settings;
|
||||||
|
|
|
@ -313,7 +313,7 @@ WebContents.prototype.printToPDF = function (options) {
|
||||||
|
|
||||||
WebContents.prototype.print = function (...args) {
|
WebContents.prototype.print = function (...args) {
|
||||||
if (features.isPrintingEnabled()) {
|
if (features.isPrintingEnabled()) {
|
||||||
this._print(args)
|
this._print(...args)
|
||||||
} else {
|
} else {
|
||||||
console.error('Error: Printing feature is disabled.')
|
console.error('Error: Printing feature is disabled.')
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue