fix: EventSource undefined in Renderer/Worker (#44496)

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
This commit is contained in:
trop[bot] 2024-10-31 17:16:36 -05:00 committed by GitHub
parent 532e5cc1f6
commit 03acaade4e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 52 additions and 6 deletions

View file

@ -6,7 +6,7 @@ wrapFsWithAsar(require('fs'));
// See ElectronRendererClient::DidCreateScriptContext.
if ((globalThis as any).blinkfetch) {
const keys = ['fetch', 'Response', 'FormData', 'Request', 'Headers'];
const keys = ['fetch', 'Response', 'FormData', 'Request', 'Headers', 'EventSource'];
for (const key of keys) {
(globalThis as any)[key] = (globalThis as any)[`blink${key}`];
}