aboutsummaryrefslogtreecommitdiff
path: root/src/console/index.jsx
diff options
context:
space:
mode:
authorShin'ya Ueoka <ueokande@i-beam.org>2018-11-18 18:47:35 +0900
committerShin'ya Ueoka <ueokande@i-beam.org>2018-11-18 18:47:35 +0900
commit63b93ce1ca16e93563453e5caba451886fa3c01d (patch)
treebf31b6519fe10f0150ecc8c6da55c7576e9677c0 /src/console/index.jsx
parent822033613061696e89725beb97265aad2bdffaa7 (diff)
Use webextension message to console
Diffstat (limited to 'src/console/index.jsx')
-rw-r--r--src/console/index.jsx5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/console/index.jsx b/src/console/index.jsx
index c0d1807..dfd323e 100644
--- a/src/console/index.jsx
+++ b/src/console/index.jsx
@@ -38,6 +38,5 @@ const onMessage = (message) => {
};
browser.runtime.onMessage.addListener(onMessage);
-window.addEventListener('message', (event) => {
- onMessage(JSON.parse(event.data));
-}, false);
+let port = browser.runtime.connect({ name: 'vimvixen-console' });
+port.onMessage.addListener(onMessage);