aboutsummaryrefslogtreecommitdiff
path: root/src/content/client/BackgroundClient.ts
blob: 4a4118476ce16ebf4af371e5b47cbfb31ae6edfa (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
import { injectable } from 'tsyringe';
import * as operations from '../../shared/operations';
import * as messages from '../../shared/messages';

@injectable()
export default class BackgroundClient {
  execBackgroundOp(op: operations.Operation): Promise<void> {
    return browser.runtime.sendMessage({
      type: messages.BACKGROUND_OPERATION,
      operation: op,
    });
  }
}