|
1 | 1 | // Licensed to the .NET Foundation under one or more agreements.
|
2 | 2 | // The .NET Foundation licenses this file to you under the MIT license.
|
3 | 3 |
|
4 |
| -import { DotNet } from '@microsoft/dotnet-js-interop'; |
5 | 4 | import { showErrorNotification } from '../../BootErrors';
|
6 | 5 | import { OutOfProcessRenderBatch } from '../../Rendering/RenderBatch/OutOfProcessRenderBatch';
|
7 | 6 | import { attachRootComponentToElement, renderBatch } from '../../Rendering/Renderer';
|
8 | 7 | import { setApplicationIsTerminated, tryDeserializeMessage } from './WebViewIpcCommon';
|
9 | 8 | import { sendRenderCompleted } from './WebViewIpcSender';
|
10 | 9 | import { internalFunctions as navigationManagerFunctions } from '../../Services/NavigationManager';
|
11 | 10 | import { dispatcher } from '../../Boot.WebView';
|
| 11 | +import { WebRendererId } from '../../Rendering/WebRendererId'; |
12 | 12 |
|
13 | 13 | export function startIpcReceiver(): void {
|
14 | 14 | const messageHandlers = {
|
15 | 15 |
|
16 | 16 | 'AttachToDocument': (componentId: number, elementSelector: string) => {
|
17 |
| - attachRootComponentToElement(elementSelector, componentId); |
| 17 | + attachRootComponentToElement(elementSelector, componentId, WebRendererId.WebView); |
18 | 18 | },
|
19 | 19 |
|
20 | 20 | 'RenderBatch': (batchId: number, batchDataBase64: string) => {
|
21 | 21 | try {
|
22 | 22 | const batchData = base64ToArrayBuffer(batchDataBase64);
|
23 |
| - renderBatch(0, new OutOfProcessRenderBatch(batchData)); |
| 23 | + renderBatch(WebRendererId.WebView, new OutOfProcessRenderBatch(batchData)); |
24 | 24 | sendRenderCompleted(batchId, null);
|
25 | 25 | } catch (ex) {
|
26 | 26 | sendRenderCompleted(batchId, (ex as Error).toString());
|
|
0 commit comments