message constants

This commit is contained in:
Shin'ya Ueoka 2017-09-16 20:26:13 +09:00
parent 83cb277ba2
commit c7a3dd16e6
5 changed files with 10 additions and 5 deletions

View file

@ -5,6 +5,7 @@ import * as scrolls from '../content/scrolls';
import * as histories from '../content/histories';
import Follow from '../content/follow';
import operations from '../operations';
import messages from '../messages';
consoleFrames.initialize(window.document);
@ -51,9 +52,9 @@ const update = (state) => {
browser.runtime.onMessage.addListener((action) => {
switch (action.type) {
case 'state.changed':
case messages.STATE_UPDATE:
return update(action.state);
case 'require.content.operation':
case messages.CONTENT_OPERATION:
execOperation(action.operation);
return Promise.resolve();
default: