send message to content instead of response

This commit is contained in:
Shin'ya Ueoka 2017-09-09 16:56:31 +09:00
parent e15de17598
commit 3d35db9fc1
2 changed files with 5 additions and 19 deletions

View file

@ -17,10 +17,7 @@ const keyPressHandle = (request, sender) => {
if (actions.isBackgroundAction(action.type)) {
return doBackgroundAction(sender, action);
} else if (actions.isContentAction(action.type)) {
return Promise.resolve({
type: 'response.action',
action: action
});
return browser.tabs.sendMessage(sender.tab.id, action);
}
return Promise.resolve();
};