Live data from Hacker News

WebAssembly becomes a W3C Recommendation

w3.org

21–30 of 248 posts

Re: WebAssembly becomes a W3C Recommendation

#21

Earlier quoted context omitted.

As in, JS development for browser? You'll still need JS to run WebAssembly in the browser. It'll bury JS in the sense that you are able to develop in any other language like C++, and compile your program to JS+WebAssembly, so you don't need to develop in JS anymore. But JS itself (under the hood) is probably to stay for longer.

And then if all web apps move to a canvas-painted UI with all the code in web assembly then there will be a major accessibility problem. Unless screen readers can now dive down into the canvas layer?

To be clear, absolutely nothing is stopping apps from doing this in JS today. There have been multiple "canvas web frameworks", even one getting funding to the tune of $27m before imploding: http://deprecated.famous.org/

Re: WebAssembly becomes a W3C Recommendation

#22
post #11
post #4

Is it safe to say, future frameworks/websites can choose to stick to HTML/CSS/WA and completely bypass JS?

It would be hard (maybe not impossible) to access the DOM in WA without a GC making sure everything is sound, because the DOM and JS (meaning the GC) are very coupled. Currently, JS is used as a mediator between the two - so you do need some JS (but it could well be JS that you never have to write yourself). I recall one of the spec authors saying in an HN thread that a GC would be added eventually, back in the infan…

I'm a web dev and I don't know much about WASM. I've been wondering - will it be possible to render something to the screen without first going through the DOM? Or is the DOM literally the only way to display content?

It's enticing to imagine being able to open a wasm file and seeing an application on the page. Kinda like how you can just open an image or a video in the browser, without rendering it via an html document.

Re: WebAssembly becomes a W3C Recommendation

#23
post #11
post #4

Is it safe to say, future frameworks/websites can choose to stick to HTML/CSS/WA and completely bypass JS?

It would be hard (maybe not impossible) to access the DOM in WA without a GC making sure everything is sound, because the DOM and JS (meaning the GC) are very coupled. Currently, JS is used as a mediator between the two - so you do need some JS (but it could well be JS that you never have to write yourself). I recall one of the spec authors saying in an HN thread that a GC would be added eventually, back in the infan…

> because the DOM and JS (meaning the GC) are very coupled.

This wasn't the intention when the script tag was introduced. It's interesting that the web standardized on one programming language.

Re: WebAssembly becomes a W3C Recommendation

#25

Earlier quoted context omitted.

As in, JS development for browser? You'll still need JS to run WebAssembly in the browser. It'll bury JS in the sense that you are able to develop in any other language like C++, and compile your program to JS+WebAssembly, so you don't need to develop in JS anymore. But JS itself (under the hood) is probably to stay for longer.

And then if all web apps move to a canvas-painted UI with all the code in web assembly then there will be a major accessibility problem. Unless screen readers can now dive down into the canvas layer?

A very valid concern. I wonder if it would be easier at this point to have screenreaders work visually rather than trying to dive into the source to grab the text.

Text recognition is getting pretty good nowadays afterall.

Re: WebAssembly becomes a W3C Recommendation

#26
post #14

Earlier quoted context omitted.

WASM is angling to break out of the web and become a cross-platform runtime. Its main competition for this space is Java.

some of the compute workload still needs to be on a backend because of security concerns. if you offload too much stuff on a client-side, then any hacker can mess with it and break your system. for example you can get angular debugger extension for chrome and mess with any online shop that uses this system to "adjust prices" for your cart during checkout

Parent meant WASM on the server.

Re: WebAssembly becomes a W3C Recommendation

#27
post #14

Earlier quoted context omitted.

WASM is angling to break out of the web and become a cross-platform runtime. Its main competition for this space is Java.

some of the compute workload still needs to be on a backend because of security concerns. if you offload too much stuff on a client-side, then any hacker can mess with it and break your system. for example you can get angular debugger extension for chrome and mess with any online shop that uses this system to "adjust prices" for your cart during checkout

the backend could compile to wasm as well.

Re: WebAssembly becomes a W3C Recommendation

#28
post #11

Earlier quoted context omitted.

It would be hard (maybe not impossible) to access the DOM in WA without a GC making sure everything is sound, because the DOM and JS (meaning the GC) are very coupled. Currently, JS is used as a mediator between the two - so you do need some JS (but it could well be JS that you never have to write yourself). I recall one of the spec authors saying in an HN thread that a GC would be added eventually, back in the infan…

I'm a web dev and I don't know much about WASM. I've been wondering - will it be possible to render something to the screen without first going through the DOM? Or is the DOM literally the only way to display content? It's enticing to imagine being able to open a wasm file and seeing an application on the page. Kinda like how you can just open an image or a video in the browser, without rendering it via an html docum…

There is currently no path for any of that. No rendering without a DOM, and no opening WASM files by themselves. The same is true for JavaScript... if you open a JavaScript file, you just see the source code.

Of course, why not just use a small HTML+JS shim for your WASM?

Re: WebAssembly becomes a W3C Recommendation

#29
post #14

Earlier quoted context omitted.

WASM is angling to break out of the web and become a cross-platform runtime. Its main competition for this space is Java.

some of the compute workload still needs to be on a backend because of security concerns. if you offload too much stuff on a client-side, then any hacker can mess with it and break your system. for example you can get angular debugger extension for chrome and mess with any online shop that uses this system to "adjust prices" for your cart during checkout

This is only a problem for online services, multiplayer games etc. These shouldn't trust client-provided data, including data that comes from WASM. But there are countless applications that can be entirely local, with no need to interact with any sort of "cloud" services. WASM can potentially be quite helpful there
Post reply on HN