diff options
author | Shin'ya Ueoka <ueokande@i-beam.org> | 2018-11-18 18:47:35 +0900 |
---|---|---|
committer | Shin'ya Ueoka <ueokande@i-beam.org> | 2018-11-18 18:47:35 +0900 |
commit | 63b93ce1ca16e93563453e5caba451886fa3c01d (patch) | |
tree | bf31b6519fe10f0150ecc8c6da55c7576e9677c0 /src/console/index.jsx | |
parent | 822033613061696e89725beb97265aad2bdffaa7 (diff) |
Use webextension message to console
Diffstat (limited to 'src/console/index.jsx')
-rw-r--r-- | src/console/index.jsx | 5 |
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); |