1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-20 10:13:31 +00:00

wire up internal messaging for safari app

This commit is contained in:
Kyle Spearrin
2019-08-15 16:36:49 -04:00
parent 3e27b3634e
commit 06234f6b23
6 changed files with 16 additions and 5 deletions

View File

@@ -23,7 +23,7 @@ export default class CommandsBackground {
async init() {
if (this.isSafari || this.isEdge || this.isVivaldi) {
BrowserApi.messageListener(async (msg: any, sender: any, sendResponse: any) => {
BrowserApi.messageListener('commands.background', async (msg: any, sender: any, sendResponse: any) => {
if (msg.command === 'keyboardShortcutTriggered' && msg.shortcut) {
await this.processCommand(msg.shortcut, sender);
}

View File

@@ -76,7 +76,7 @@ export default class RuntimeBackground {
await this.checkOnInstalled();
BrowserApi.messageListener(async (msg: any, sender: any, sendResponse: any) => {
BrowserApi.messageListener('runtime.background', async (msg: any, sender: any, sendResponse: any) => {
await this.processMessage(msg, sender, sendResponse);
});
}