Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
Discussion options

Hi, this is a great tool, I want to ask does it support passing the file changed event from js to C#? I tried but got this:

Error: System.NotSupportedException: DeserializeNoConstructor, JsonConstructorAttribute, Microsoft.AspNetCore.Components.Forms.InputFileChangeEventArgs Path: $ | LineNumber: 0 | BytePositionInLine: 1.

You must be logged in to vote

Only JSON-serializable types can be passed directly (by value), but it's also possible to interop with instances via wrappers:

https://github.com/Elringus/DotNetJS/blob/a1720e7819e3b06b78c1100a042e7e02cc1dd6c2/JavaScript/test/interop.js#L85-L114

Replies: 1 comment · 2 replies

Comment options

Only JSON-serializable types can be passed directly (by value), but it's also possible to interop with instances via wrappers:

https://github.com/Elringus/DotNetJS/blob/a1720e7819e3b06b78c1100a042e7e02cc1dd6c2/JavaScript/test/interop.js#L85-L114

You must be logged in to vote
2 replies
@AngxiaoLu123
Comment options

Sorry, how can I wrap InputFileChangeEventArgs to instances? I want to unzip user selected file and upload files in the webassembly without Blazor, I tried .Net 7 but JSExport attribute does not support this. Do you think it is possible? Thanks a lot!

@elringus
Comment options

Only .NET 6 is supported for the time being: #20

Answer selected by elringus
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
🙏
Q&A
Labels
None yet
2 participants
Morty Proxy This is a proxified and sanitized view of the page, visit original site.