Adds nkJSObject.DotNetVersionFixups for dotnet 10.0#19
Adds nkJSObject.DotNetVersionFixups for dotnet 10.0#19squarebananas wants to merge 1 commit intonkast:mainfrom
Conversation
|
I don't see what else we can do with Module, until we remove .net8 and replace this inplace. The only place we use BINDING.conv_string Is it possible to inline the code there, assuming it works on both .net8 and .net10 ? For getArrayLength(...) my plan was to pass the length from the C# side, but that will require some time. |
What would the reason for that be, compared to say having it accessible by
Yeah. I had it so that all the original net8.0 implementations would not be replaced for now though. Mainly for testing that everything works as expected when switching between net8 and net10. I can just replace that if you prefer though.
I can sort a PR for that if you want. |
Adds a nkJSObject.DotNetVersionFixups function to apply dotnet 10.0 fixups.
Calling this function allows
net10.0to be added as a target framework for the nkast.Wasm projects and Kni.BlazorGL. It does so by adding back the removedModule,BINDING.conv_stringandBlazor.platform.getArrayLengthdefinitions, but only if they are missing. This means no changes will occur to the original implementations when usingnet8.0.In the case of Kni, adding
window.nkJSObject.DotNetVersionFixups();at the beginning of the existingwindow.initRenderJSfunction inindex.htmlwill ensure the fixups are in place at startup. I have added this tonkJSObjectas this serves as a base object for most things, however this could be moved to another location if preferred.Associated Kni GitHub discussion post:
kniEngine/kni#2541