bitwarden-estensione-browser/src/services/browserMessaging.service.ts

9 lines
328 B
TypeScript
Raw Normal View History

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