aboutsummaryrefslogtreecommitdiffstats
path: root/packages/service-preload/src/index.ts
diff options
context:
space:
mode:
Diffstat (limited to 'packages/service-preload/src/index.ts')
-rw-r--r--packages/service-preload/src/index.ts4
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
21import { ServiceToMainIpcMessage, webSource } from '@sophie/service-shared'; 21import { ServiceToMainIpcMessage, WebSource } from '@sophie/service-shared';
22import { ipcRenderer, webFrame } from 'electron'; 22import { ipcRenderer, webFrame } from 'electron';
23 23
24if (webFrame.parent === null) { 24if (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}