bitwarden-estensione-browser/libs/common/src/services/container.service.ts

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

21 lines
471 B
TypeScript
Raw Normal View History

import { CryptoService } from "../abstractions/crypto.service";
2018-01-10 04:28:29 +01:00
export class ContainerService {
2018-10-14 04:21:54 +02:00
constructor(private cryptoService: CryptoService) {}
2018-01-10 04:28:29 +01:00
2018-05-15 05:41:12 +02:00
// deprecated, use attachToGlobal instead
2018-01-10 04:28:29 +01:00
attachToWindow(win: any) {
2018-05-15 05:41:12 +02:00
this.attachToGlobal(win);
}
attachToGlobal(global: any) {
if (!global.bitwardenContainerService) {
global.bitwardenContainerService = this;
2018-01-10 04:28:29 +01:00
}
2021-12-16 13:36:21 +01:00
}
2018-01-10 04:28:29 +01:00
getCryptoService(): CryptoService {
return this.cryptoService;
}
}