From 95da3561fa3612c8dd452dbf2fc1483509038c99 Mon Sep 17 00:00:00 2001 From: Nathan Muggli Date: Thu, 12 Oct 2023 09:46:03 -0600 Subject: [PATCH] Convert a function call to a promise. --- api-samples/printing/printers.js | 2 +- api-samples/printing/roll-printing/printers.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/api-samples/printing/printers.js b/api-samples/printing/printers.js index 5ecff092ad..528af19d58 100644 --- a/api-samples/printing/printers.js +++ b/api-samples/printing/printers.js @@ -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); } diff --git a/api-samples/printing/roll-printing/printers.js b/api-samples/printing/roll-printing/printers.js index d1608de4f8..7c51b2f9ee 100644 --- a/api-samples/printing/roll-printing/printers.js +++ b/api-samples/printing/roll-printing/printers.js @@ -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); }