diff options
author | Shin'ya Ueoka <ueokande@i-beam.org> | 2017-08-12 11:08:43 +0900 |
---|---|---|
committer | Shin'ya Ueoka <ueokande@i-beam.org> | 2017-08-12 11:22:09 +0900 |
commit | e73d405c5640afda27775285f19516a271b5cefb (patch) | |
tree | da08aefd9c5f718f96aff84c4f2c95554796999b /src/background/index.js | |
parent | d169661e030e53b6a1635f86205f9fc42d2b7ef2 (diff) |
message passing between background and content
Diffstat (limited to 'src/background/index.js')
-rw-r--r-- | src/background/index.js | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/background/index.js b/src/background/index.js new file mode 100644 index 0000000..ee02f63 --- /dev/null +++ b/src/background/index.js @@ -0,0 +1,4 @@ +browser.runtime.onMessage.addListener((request, sender, sendResponse) => { + console.log("Pressed " + request.which); + sendResponse({ response: "Response from background script" }); +}); |