Repository navigation
refactor(wasm)!: Remove legacy IJSObject DOM-interop (BC02) - #23673
Conversation
7c08656 to
8f945c0
Compare
|
🤖 Your WebAssembly Skia Sample App stage site is ready! Visit it here: https://unowasmprstaging.z20.web.core.windows.net/pr-23673/wasm-skia-net9/index.html |
|
|
|
🤖 Your WebAssembly Skia Sample App stage site is ready! Visit it here: https://unowasmprstaging.z20.web.core.windows.net/pr-23673/wasm-skia-net9/index.html |
|
We likely can drop foundation.runtime.webassembly entirely. |
|
#23673 (comment) |
17e06ee to
e599f84
Compare
|
🤖 Your WebAssembly Skia Sample App stage site is ready! Visit it here: https://unowasmprstaging.z20.web.core.windows.net/pr-23673/wasm-skia-net9/index.html |
|
|
Delete the Uno-only IJSObject DOM-interop mechanism, a legacy WASM scaffolding with no WinUI counterpart, no in-repo consumers, and no [GeneratedJSObject] generator to produce implementations. On default settings runtime behaviour is unchanged - this removes an unreachable code path. Removed: - IJSObject / IJSObjectMetadata (public interfaces) - JSObjectHandle (public class) - JSObject (public class; its Dispatch [JSExport] was only reachable via the ManagedObject TS dispatch side) - JSObjectMetadataProvider (internal JS-prototype generator, orphaned) - ts/Interop/ManagedObject.ts (TS dispatch side, only called by the generated prototype) - WebAssemblyRuntime.InvokeJSWithInterop (public helper whose sole purpose was marshalling IJSObject arguments into the JS call; zero in-repo callers) Package-diff entries added for the four removed public types and the InvokeJSWithInterop method. Migration guidance added to migrating-to-uno-7.md. Part of #2125 (Phase 3 breaking changes); refs #8339. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
The migration guide told readers to replace the removed InvokeJSWithInterop with WebAssemblyRuntime.InvokeJS, but that string-eval API is itself legacy (eval-based, not CSP-compliant). Point migrators to [JSImport]/[JSExport] as the recommended path, and note InvokeJS survives but is not recommended for new code. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
Re-add the package-diff ignore entries for the IJSObject DOM-interop API removed in BC02, placed under the 6.5 baseVersion set (Types + Methods) rather than 6.6. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
e599f84 to
b0599e8
Compare
|
🤖 Your WebAssembly Skia Sample App stage site is ready! Visit it here: https://unowasmprstaging.z20.web.core.windows.net/pr-23673/wasm-skia-net9/index.html |
GitHub Issue: unoplatform/uno-private#2125
PR Type:
💬 Other... — breaking change (legacy public API removal), part of the Uno 7.0 breaking-changes epic.
What changed? 🚀
Removes the Uno-only, DOM-based WebAssembly JavaScript object-marshalling mechanism (BC02), which has no WinUI counterpart and only served the maintenance-only native WASM-DOM layer:
Uno.Foundation.Interop.IJSObject,IJSObjectMetadata,JSObject,JSObjectHandle, and theJSObjectMetadataProviderplumbing.WebAssemblyRuntime.InvokeJSWithInterop(FormattableString)— theeval+IJSObject-substitution entry point.ManagedObject.tsinterop shim.It also fixes the corresponding entry in the Uno 7.0 migration guide: previously it told readers to replace
InvokeJSWithInteropwithWebAssemblyRuntime.InvokeJS, but that string-evalAPI is itself legacy (eval-based, not CSP-compliant). The guide now points migrators to the recommended[JSImport]/[JSExport]interop (System.Runtime.InteropServices.JavaScript), and clarifies thatInvokeJS(string)still exists but is not recommended for new code.build/PackageDiffIgnore.xmlis updated to acknowledge the removed public member in the API-diff gate.PR Checklist ✅
Screenshots Compare Test Runresults.Breaking change — impact & migration path
Impact: Code that used the Uno-only WASM object-marshalling interop (
IJSObjectand friends, orWebAssemblyRuntime.InvokeJSWithInterop(FormattableString)) no longer compiles. This affected only WebAssembly and had no WinUI equivalent.Migration: Move to the standard .NET WebAssembly interop, JSImport/JSExport (
System.Runtime.InteropServices.JavaScript) — the recommended, source-generated, thread-safe, CSP-compliant path. The string-basedWebAssemblyRuntime.InvokeJS(string)remains available but is a legacyeval-based API and is not recommended for new code. Full details are in the Uno 7.0 migration guide.