message passing between background and content
This commit is contained in:
parent
d169661e03
commit
e73d405c56
6 changed files with 19 additions and 23 deletions
4
src/background/index.js
Normal file
4
src/background/index.js
Normal file
|
@ -0,0 +1,4 @@
|
|||
browser.runtime.onMessage.addListener((request, sender, sendResponse) => {
|
||||
console.log("Pressed " + request.which);
|
||||
sendResponse({ response: "Response from background script" });
|
||||
});
|
Reference in a new issue