简体   繁体   English

使用Blazor(即WebAssembly)+ JavaScript

[英]Using Blazor (i.e. WebAssembly) + javascript

Im really excited at what WebAssembly can bring to us web UI developers. 我对WebAssembly可以为我们带来的Web UI开发人员感到非常兴奋。 Now correct me if im wrong, but a web assembly / blazor project can easily and happily coexist with javascript. 现在,如果我做错了,请纠正我,但是Web Assembly / Blazor项目可以轻松愉快地与javascript共存。 The script might handle all the http web requests and various clientside manipulations. 该脚本可能会处理所有http Web请求和各种客户端操作。

Your thoughts? 你的意见?

Yes, you could do that, as of version 0.4 it is easy to interop between c# and javascript and vise versa. 是的,您可以执行此操作,从0.4版开始,很容易在c#和javascript之间进行互操作,反之亦然。

But you don't have to, the beauty of blazor is that you can just use the HttpClient class from .net framework System.Net.Http namespace for calls to your backend. 但是,您不必这样做,blazor的优点在于您可以仅使用.net框架System.Net.Http命名空间中的HttpClient类来调用后端。 And make razor cshtml components for DOM manipulation. 并制作用于DOM操作的剃须刀cshtml组件。

More on http calls from blazor 有关blazor的http调用的更多信息

More on js interop 有关js互操作的更多信息

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 WebAssembly从ism调用JavaScript方法,即在C ++代码中 - WebAssembly calling JavaScript methods from wasm i.e. within C++ code JavaScript提示输入密码(即*******) - javascript prompt for password (i.e. *******) javascript在IE 9和Firefox中均不起作用 - javascript not working in I.E. 9 as well as Firefox 使用客户端技术(即Javascript)仅显示表的一部分 - Showing only part of a table using Client-side technologies, i.e. Javascript 使用 Javascript 在 Mobile Safari / iPhone 中防止鼠标模拟事件(即点击) - Preventing mouse emulation events (i.e. click) from touch events in Mobile Safari / iPhone using Javascript 在 Blazor Webassembly 中从 .NET 读取 Javascript 变量 - Read Javascript variable from .NET in Blazor Webassembly 将VBScript代码转换为javascript(即JScript)代码 - Convert VBScript code to javascript (i.e. JScript) code 与Javascript库互操作(即NPM包AWS Amplify) - Interop with Javascript libraries (I.e. NPM package AWS Amplify) javascript / jquery:如何在轮播中进行分页(即数字 - javascript/jquery: how to make pagination in carousel (i.e. numbers 创建一个可嵌入的javascript小部件(即-uservoice,disqus,getsatisfaction) - Creating a embeddable javascript widget (i.e. - uservoice, disqus, getsatisfaction)
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM