1
0
mirror of https://github.com/bitwarden/browser.git synced 2024-10-19 07:35:48 +02:00
bitwarden-browser/src/services/browserMessaging.service.ts

16 lines
438 B
TypeScript
Raw Normal View History

2018-01-09 20:26:20 +01:00
import {
MessagingService,
PlatformUtilsService,
} from 'jslib/abstractions';
2018-01-04 22:06:00 +01:00
2018-01-09 20:26:20 +01:00
export default class BrowserMessagingService implements MessagingService {
constructor(private platformUtilsService: PlatformUtilsService) {
2018-01-04 22:06:00 +01:00
}
send(subscriber: string, arg: any = {}) {
// if safari, else
const message = Object.assign({}, { command: subscriber }, arg);
chrome.runtime.sendMessage(message);
}
}