diff options
author | Shin'ya Ueoka <ueokande@i-beam.org> | 2017-09-09 20:36:07 +0900 |
---|---|---|
committer | Shin'ya Ueoka <ueokande@i-beam.org> | 2017-09-09 20:36:07 +0900 |
commit | 8593b3f5cd0992dd250f5a845c19dc60bbb0bc91 (patch) | |
tree | 64f0280b00417e23385580e0b3a5172ac8b79ceb /src | |
parent | e6c5aea0748a108fc2c8eccc233130d08a957fb8 (diff) |
remove messages
Diffstat (limited to 'src')
-rw-r--r-- | src/shared/messages.js | 19 |
1 files changed, 0 insertions, 19 deletions
diff --git a/src/shared/messages.js b/src/shared/messages.js deleted file mode 100644 index 517fc4c..0000000 --- a/src/shared/messages.js +++ /dev/null @@ -1,19 +0,0 @@ -const receive = (win, callback) => { - win.addEventListener('message', (e) => { - let message; - try { - message = JSON.parse(e.data); - } catch (e) { - // ignore message posted by author of web page - return; - } - - callback(message); - }) -} - -const send = (win, message) => { - win.postMessage(JSON.stringify(message), '*'); -} - -export { receive, send }; |