Skip to content

Commit 94edbe2

Browse files
committed
Call the native messaging host when we need to cancel the printing
1 parent 1212ef1 commit 94edbe2

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

webextensions/edge/background.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,11 @@ chrome.scripting.registerContentScripts([{
2121
}]);
2222

2323

24-
chrome.runtime.onMessage.addListener((message, sender, sendResponse) => {
24+
chrome.runtime.onMessage.addListener((message, sender, _sendResponse) => {
2525
console.log("accept message.");
2626
if (message === 'cancel') {
27-
sendResponse(user);
27+
const query = new String('Q ' + BROWSER);
28+
chrome.runtime.sendNativeMessage(SERVER_NAME, query);
2829
}
2930
return true;
3031
});

0 commit comments

Comments
 (0)