Skip to content

refactor(wasm)!: Remove interop whose JavaScript is no longer shipped (backport #25944) - #26286

Closed
mergify[bot] wants to merge 1 commit into
release/stable/7.0from
mergify/bp/release/stable/7.0/pr-25944
Closed

mergify[bot] wants to merge 1 commit into
release/stable/7.0from
mergify/bp/release/stable/7.0/pr-25944

Conversation

@mergify

@mergify mergify Bot commented Nov 10, 2026

Copy link
Copy Markdown
Contributor

GitHub Issue: closes #24515

PR Type:

🔄 Refactoring (breaking: public API removed)

What changed? 🚀

WebAssemblyRuntime.InvokeAsync and WebAssemblyRuntime.InvokeJSUnmarshalled called JavaScript (Uno.UI.Interop.AsyncInteropHelper, MonoSupport.jsCallDispatcher) that only the WebAssembly DOM heads loaded. Those heads were removed in 7.0 and the sources deleted in #24351, so both APIs failed at runtime in every app. By the issue's inspection of 6.7, they never worked on the Skia renderer either.

Restoring them would mean shipping eval-based interop again: InvokeAsync takes JavaScript as a string, which is what #24429 is trying to remove. So they are removed as a documented 7.0 break, next to the rest of the legacy interop the migration guide already lists.

Removed

  • WebAssemblyRuntime.InvokeAsync(string) and InvokeAsync(string, CancellationToken), with their DispatchAsyncResult / DispatchAsyncError [JSExport] callbacks and the pending-task bookkeeping.
  • WebAssemblyRuntime.InvokeJSUnmarshalled(string, IntPtr) and (string, IntPtr, IntPtr), plus the internal overloads, GetMethodId, MethodMap and the [JSImport] targeting MonoSupport.jsCallDispatcher.
  • TSInteropMarshaller: internal, and the only caller of InvokeJSUnmarshalled. The bindings generator that produced its users is gone. This empties Uno.Foundation.Interop, so the three storage files that still imported it lose the unused using.
  • CoreWindow.NativeMethods.SetCursor: an import targeting Uno.UI.WindowManager. Its only caller was src/Uno.UI/Runtime/BrowserPointerInputSource.wasm.cs, a DOM-head leftover that no project compiles. That file is removed too. The Skia browser host's own BrowserPointerInputSource sets the cursor through WebAssemblyWindowWrapper.setCursor.

Docs:

  • The migration guide gets an entry next to the existing legacy-interop bullet, with a [JSImport] Task<string> example replacing InvokeAsync.
  • PackageDiffIgnore.xml gets entries for the six removed public members, in both the 6.6 and 6.7 baseline sets, like the existing InvokeJSWithInterop entry.

Downstream: an org-wide code search finds InvokeAsync in Uno.Microsoft.Identity.Client (last pushed in 2020, built against Uno 3) and the Uno.Figma plugin. Nothing outside this repo calls InvokeJSUnmarshalled or TSInteropMarshaller.

Validation

  • Compile: Uno.Foundation.Runtime.WebAssembly, Uno.WinRT.Wasm and Uno.UI.Runtime.WebAssembly.Browser build with analyzers on.
  • WebAssembly runtime: SamplesApp, published from a clean build and run in headless Edge. Given_ApplicationDataContainer, Given_StorageFolder and Given_BrowserPointerInputSource pass 89/89, with no MonoSupport or AsyncInteropHelper errors in the console.
  • Docs: markdownlint with build/.markdownlint.json and cspell are clean on the migration guide.

PR Checklist ✅

Removes WebAssemblyRuntime.InvokeAsync and InvokeJSUnmarshalled, which no longer worked at runtime. Migrate to [JSImport]/[JSExport]; the 7.0 migration guide shows the replacement.

🤖 Generated with Claude Code


This is an automatic backport of pull request #25944 done by [Mergify](https://mergify.com).

WebAssemblyRuntime.InvokeAsync and InvokeJSUnmarshalled called JavaScript that only the WebAssembly DOM heads loaded, so they failed in every Skia app (fixes #24515). TSInteropMarshaller, a CoreWindow SetCursor import and an uncompiled BrowserPointerInputSource copy go with them.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
(cherry picked from commit 13eb00b)
@github-actions github-actions Bot added platform/wasm 🌐 Categorizes an issue or PR as relevant to the WebAssembly platform area/build Categorizes an issue or PR as relevant to build infrastructure kind/documentation labels Nov 10, 2026
@mergify

mergify Bot commented Nov 10, 2026 •

Copy link
Copy Markdown
Contributor Author

This pull request is closed, so it cannot be queued. Reopen it to get the box back.

@unodevops

Copy link
Copy Markdown
Contributor

@unodevops

Copy link
Copy Markdown
Contributor

🤖 Your WebAssembly Sample App stage site is ready! Visit it here:

@nventive-devops

Copy link
Copy Markdown
Contributor

The build 245211 did not find any UI Test snapshots differences.

@agneszitte

Copy link
Copy Markdown
Member

Closing: #25944 reached release/stable/7.0 through the master sync #26251. Every line this backport adds is on the branch now.

@agneszitte agneszitte closed this Nov 11, 2026
@MartinZikmund
MartinZikmund deleted the mergify/bp/release/stable/7.0/pr-25944 branch November 12, 2026 10:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/build Categorizes an issue or PR as relevant to build infrastructure kind/documentation platform/wasm 🌐 Categorizes an issue or PR as relevant to the WebAssembly platform

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants