Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: carry through arguments in webContents.print() (backport: 5-0-x) #17117

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion atom/browser/api/atom_api_web_contents.cc
Expand Up @@ -1484,7 +1484,7 @@ bool WebContents::IsCurrentlyAudible() {

#if BUILDFLAG(ENABLE_PRINTING)
void WebContents::Print(mate::Arguments* args) {
bool silent, print_background = false;
bool silent = false, print_background = false;
base::string16 device_name;
mate::Dictionary options = mate::Dictionary::CreateEmpty(args->isolate());
base::DictionaryValue settings;
Expand Down
2 changes: 1 addition & 1 deletion lib/browser/api/web-contents.js
Expand Up @@ -313,7 +313,7 @@ WebContents.prototype.printToPDF = function (options, callback) {

WebContents.prototype.print = function (...args) {
if (features.isPrintingEnabled()) {
this._print(args)
this._print(...args)
} else {
console.error('Error: Printing feature is disabled.')
}
Expand Down