mirror of
https://github.com/bitwarden/browser.git
synced 2024-10-19 07:35:48 +02:00
22 lines
514 B
TypeScript
22 lines
514 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;
|
|
}
|
|
}
|