This commit is contained in:
Diego Colombo 2022-04-06 10:41:20 +01:00 коммит произвёл Brett V. Forsgren
Родитель 0d62bbc0a0
Коммит 376c76ee11
1 изменённых файлов: 2 добавлений и 3 удалений

Просмотреть файл

@ -9,7 +9,6 @@ import { ProjectKernel } from "./projectKernel";
import { IWasmRunner } from './wasmRunner';
import { createApiService } from './apiService';
import * as dotnetInteractive from '@microsoft/dotnet-interactive';
import { PromiseCompletionSource } from '@microsoft/dotnet-interactive';
export function createWasmProjectKernel(): ProjectKernel {
const wasmIframe = document.createElement('iframe');
@ -34,7 +33,7 @@ export function createWasmProjectKernel(): ProjectKernel {
const postAndLog = (message: any) => {
hostWindow.postMessage(message, '*');
const messageLogger = hostWindow['postMessageLogger'];
const messageLogger = hostWindow['postMessageLogger'] || window['postMessageLogger'];
if (typeof (messageLogger) === 'function') {
messageLogger(message);
}
@ -80,7 +79,7 @@ class WasmRunner {
onError: (error: string) => void,
}): Promise<void> {
let completionSource = new PromiseCompletionSource<IWasmRunnerMessage>();
let completionSource = new dotnetInteractive.PromiseCompletionSource<IWasmRunnerMessage>();
let sub = this._wasmIframeMessages.subscribe((wasmRunnerMessage) => {
let type = wasmRunnerMessage.type;