WASM Package: package_47e89ee7f98b4ae7b9258cdf097e50db93ad313b

This proof-of-concept demos a managed C#WASM wrapper for JQuery, which facilitates DOM manipulation and event handling from C#WASM. All C# is running client side inside the browser as WebAssembly. For additional information and source code see: https://github.com/SerratedSharp/SerratedJQ

In this demo the client-side C#WASM subscribes to JQuery on('input',...) event. The C# handler updates the form via JQUery.add/removeClass() based on whether the number has a valid check digit. The handler also tracks the number of events it has handled and echos the count to the form.

Valid Luhn checkdigit.
Invalid Luhn checkdigit.
The C# client-side handler has handled 0 input events.

We setup a button which makes JS->C# interop calls, and the C# type responds in turn by making C#->JQuery calls by manipulating the DOM in various ways. The C# type has a simple counter to track how many clicks have been made, and also holds a collection of rows.