Skip to content

ochtum/BlazorWebAsemblyTest

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

English 日本語

This source code is an experiment in calling WebAssembly from JavaScript.

The call sequence is as follows:

1. Open the Counter page from the menu (loads the Counter.razor component)

1-1. The OnAfterRenderAsync method is triggered

  • The JavaScript file is loaded.
  • The addHandlers function in JavaScript is executed.

1-2. In the addHandlers function, a click event is bound to the element with the btn ID.

2. Click the [WebAssembly Execute] button

2-1. The returnArrayAsync function in JavaScript is called.

  • The ReturnArrayAsync method in WebAssembly is invoked.

2-2. The ReturnArrayAsync method in the Razor component is executed, and the value passed to the FromResult method is returned to the caller.

2-3. The value returned by the ReturnArrayAsync method in WebAssembly is output to the console log.

About

This source code is an experiment in calling WebAssembly from JavaScript.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published