Skip to content

Commit

Permalink
Convert a function call to a promise.
Browse files Browse the repository at this point in the history
  • Loading branch information
nmuggli committed Oct 12, 2023
1 parent b4c4fba commit 95da356
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion api-samples/printing/printers.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ function onPrintButtonClicked(printerId, dpi) {
})
}
};
chrome.printing.submitJob(request, (response) => {
chrome.printing.submitJob(request).then((response) => {
if (response !== undefined) {
console.log(response.status);
}
Expand Down
2 changes: 1 addition & 1 deletion api-samples/printing/roll-printing/printers.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ function onPrintButtonClicked(printerId, dpi, width, performTrim) {
})
}
};
chrome.printing.submitJob(request, (response) => {
chrome.printing.submitJob(request).then((response) => {
if (response !== undefined) {
console.log(response.status);
}
Expand Down

0 comments on commit 95da356

Please sign in to comment.