1
0
mirror of https://github.com/bitwarden/jslib synced 2026-01-11 13:03:17 +00:00
Files
jslib/common/src/services/container.service.ts
2021-12-16 13:36:21 +01:00

21 lines
471 B
TypeScript

import { CryptoService } from "../abstractions/crypto.service";
export class ContainerService {
constructor(private cryptoService: CryptoService) {}
// deprecated, use attachToGlobal instead
attachToWindow(win: any) {
this.attachToGlobal(win);
}
attachToGlobal(global: any) {
if (!global.bitwardenContainerService) {
global.bitwardenContainerService = this;
}
}
getCryptoService(): CryptoService {
return this.cryptoService;
}
}