Last active
April 14, 2018 19:08
-
-
Save gskachkov/e43e125a4fe3ceb9ac9d3029a51081e9 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Blazor.registerFunction('invoke', msg => { | |
const logMethod = Blazor.platform.findMethod( | |
'StandaloneApp', // Assembly name | |
'BlazorExport', // Namespace | |
'Helper', // Class name | |
'Log' // Method name | |
); | |
const wasmResult = Blazor.platform.callMethod(logMethod, null, [ | |
Blazor.platform.toDotNetString('Invoke from JS') | |
]); | |
const result = Blazor.platform.toJavaScriptString(wasmResult); | |
console.log(result); | |
return true; | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment