diff --git a/src/Uno.UI/ts/ExportManager.ts b/src/Uno.UI/ts/ExportManager.ts new file mode 100644 index 000000000000..bb4e9436dfb2 --- /dev/null +++ b/src/Uno.UI/ts/ExportManager.ts @@ -0,0 +1,16 @@ +// eslint-disable-next-line @typescript-eslint/no-namespace +namespace Uno.UI { + + export class ExportManager { + + public static async initialize(): Promise { + + if ((Module).getAssemblyExports !== undefined) { + const unoExports = await (Module).getAssemblyExports("Uno"); + const unoUIExports = await (Module).getAssemblyExports("Uno.UI"); + + (globalThis).DotnetExports = { Uno: unoExports, UnoUI: unoUIExports }; + } + } + } +} diff --git a/src/Uno.UI/ts/WindowManager.ts b/src/Uno.UI/ts/WindowManager.ts index 5de4f8f3b0e0..52ed10ef72fc 100644 --- a/src/Uno.UI/ts/WindowManager.ts +++ b/src/Uno.UI/ts/WindowManager.ts @@ -61,7 +61,7 @@ namespace Uno.UI { private static buildReadyPromise(): Promise { return new Promise(resolve => { Promise.all( - [WindowManager.buildSplashScreen()] + [WindowManager.buildSplashScreen(), ExportManager.initialize()] ).then(() => resolve(true)) }); }