Use synchronous IPC for passing config

This commit is contained in:
Fedor Indutny 2023-04-07 09:42:12 -07:00 committed by GitHub
parent 3e586be46a
commit bd41d7b216
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 87 additions and 97 deletions

View file

@ -25,7 +25,9 @@ contextBridge.exposeInMainWorld(
contextBridge.exposeInMainWorld('SignalContext', {
...SignalContext,
renderWindow: () => {
const { forCalling, forCamera } = SignalContext.config;
const params = new URLSearchParams(document.location.search);
const forCalling = params.get('forCalling') === 'true';
const forCamera = params.get('forCamera') === 'true';
let message;
if (forCalling) {