Hacker News new | ask | show | jobs
by encryptluks2 1341 days ago
Because that is what new frameworks are doing.
1 comments

There are situations where JavaScript is being replaced with WebAssembly. There are absolutely no situations where serialised HTML is being replaced with WebAssembly.
Flutter web is one of them. It displays on a canvas element.

In the future with WASM, I expect the same thing, a Rust web app that also displays on a canvas for example.

How are you going to address accessibility when rendering everything on a canvas element? What are search engines going to scrape?
Flutter builds a parallel accessibility tree in the DOM that screen readers and search engines scrape. It's kinda cool, you don't have to rely on HTML, CSS and JS as the application layer, use something else like WASM for that, but for the document layer, use HTML. In a way, it's like the original purpose of HTML is preserved, as I see many people on HN complain about how the DOM shouldn't be used for applications and should only be used for documents.
I see it all the time. Tons of sites out there are replacing standard HTML with JS and won't even work without JS.
I said nothing about replacing HTML with JavaScript.
That is what these frameworks will do.