85

I've been wondering about this for a while and haven't really found a great answer for it. From what I understand, WASM is:

  • Faster than JavaScript

  • Has a smaller file size

  • Can be compiled to from pretty much any programming language

  • Can be used outside of the browser easier thanks to WASI

So why aren't most websites starting to try replacing (most) JS with WASM now that it's supported by every major browser? The most compelling argument I heard is that WASM can't manipulate the DOM and a lot of people don't want to deal with gluing JS code to it, but aside from that, is there something I'm missing?

you are viewing a single comment's thread
view the rest of the comments
[-] AnarchoYeasty@beehaw.org 7 points 1 year ago

JS has little to do with accessibility. Most web accessibility comes from the Dom and aria attributes as well as semantic tags. You can do all of that with wasm too.

Are you asking about how it will work with wgpu based applications? This will work the same as it does on desktop applications. The program calls out to libraries that support talking to screen readers. I know rust the language with the best support for and ecosystem around wasm libraries like this already exist and ui frameworks like egui already have some support built in.

this post was submitted on 07 Aug 2023
85 points (98.9% liked)

Programming

16968 readers
250 users here now

Welcome to the main community in programming.dev! Feel free to post anything relating to programming here!

Cross posting is strongly encouraged in the instance. If you feel your post or another person's post makes sense in another community cross post into it.

Hope you enjoy the instance!

Rules

Rules

  • Follow the programming.dev instance rules
  • Keep content related to programming in some way
  • If you're posting long videos try to add in some form of tldr for those who don't want to watch videos

Wormhole

Follow the wormhole through a path of communities !webdev@programming.dev



founded 1 year ago
MODERATORS