1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-10 21:33:27 +00:00

[PM-3996] Scaffolding for preload script (#6065)

This PR wires up a polyfill for window.ipc which allows us to progressively migrate the codebase to a format which supports context bridge. This avoids a big bang effort where every non sandboxed call has to be migrated before we can run the code.

Once all calls to node modules are removed from the renderer and only exists in preload.ts. We will turn on context isolation and use the context bridge for communication instead.
This commit is contained in:
Oscar Hinton
2023-10-12 11:50:17 +02:00
committed by GitHub
parent 77d7813742
commit 7cfa38e344
13 changed files with 131 additions and 28 deletions

View File

@@ -10,7 +10,6 @@ import {
} from "@angular/core";
import { DomSanitizer } from "@angular/platform-browser";
import { Router } from "@angular/router";
import { ipcRenderer } from "electron";
import { IndividualConfig, ToastrService } from "ngx-toastr";
import { firstValueFrom, Subject, takeUntil } from "rxjs";
@@ -227,7 +226,7 @@ export class AppComponent implements OnInit, OnDestroy {
this.systemService.cancelProcessReload();
break;
case "reloadProcess":
ipcRenderer.send("reload-process");
ipc.platform.reloadProcess();
break;
case "syncStarted":
break;