diff options
Diffstat (limited to 'packages/service-preload/src/index.ts')
-rw-r--r-- | packages/service-preload/src/index.ts | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/packages/service-preload/src/index.ts b/packages/service-preload/src/index.ts index 8b6630a..5383f42 100644 --- a/packages/service-preload/src/index.ts +++ b/packages/service-preload/src/index.ts | |||
@@ -18,7 +18,7 @@ | |||
18 | * SPDX-License-Identifier: AGPL-3.0-only | 18 | * SPDX-License-Identifier: AGPL-3.0-only |
19 | */ | 19 | */ |
20 | 20 | ||
21 | import { ServiceToMainIpcMessage, webSource } from '@sophie/service-shared'; | 21 | import { ServiceToMainIpcMessage, WebSource } from '@sophie/service-shared'; |
22 | import { ipcRenderer, webFrame } from 'electron'; | 22 | import { ipcRenderer, webFrame } from 'electron'; |
23 | 23 | ||
24 | if (webFrame.parent === null) { | 24 | if (webFrame.parent === null) { |
@@ -52,7 +52,7 @@ async function fetchAndExecuteInjectScript(): Promise<void> { | |||
52 | const apiExposedResponse: unknown = await ipcRenderer.invoke( | 52 | const apiExposedResponse: unknown = await ipcRenderer.invoke( |
53 | ServiceToMainIpcMessage.ApiExposedInMainWorld, | 53 | ServiceToMainIpcMessage.ApiExposedInMainWorld, |
54 | ); | 54 | ); |
55 | const injectSource = webSource.parse(apiExposedResponse); | 55 | const injectSource = WebSource.parse(apiExposedResponse); |
56 | // Isolated world 0 is the main world. | 56 | // Isolated world 0 is the main world. |
57 | await webFrame.executeJavaScriptInIsolatedWorld(0, [injectSource]); | 57 | await webFrame.executeJavaScriptInIsolatedWorld(0, [injectSource]); |
58 | } | 58 | } |