diff options
author | Shin'ya Ueoka <ueokande@i-beam.org> | 2018-02-04 19:27:22 +0900 |
---|---|---|
committer | Shin'ya Ueoka <ueokande@i-beam.org> | 2018-02-04 19:27:22 +0900 |
commit | f6f64297aa030cd3fbad4bbb9e322e469bc762e8 (patch) | |
tree | 02ad2374c6e7060c7f13658e7dd4c3c0d99b5b9f /e2e/ambassador/src/background/index.js | |
parent | bb5b6d367cdd19a1d81c78cf8a79c47520ca469e (diff) |
first webextension test
Diffstat (limited to 'e2e/ambassador/src/background/index.js')
-rw-r--r-- | e2e/ambassador/src/background/index.js | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/e2e/ambassador/src/background/index.js b/e2e/ambassador/src/background/index.js index e69de29..027c953 100644 --- a/e2e/ambassador/src/background/index.js +++ b/e2e/ambassador/src/background/index.js @@ -0,0 +1,12 @@ +import { WINDOWS_CREATE, WINDOWS_REMOVE } from '../shared/messages'; +import { receiveContentMessage } from './ipc'; + +receiveContentMessage((message) => { + switch (message.type) { + case WINDOWS_CREATE: + return browser.windows.create(); + case WINDOWS_REMOVE: + return browser.windows.remove(message.windowId); + } +}); + |