2 ms·
WASM is fantastic, I have no problem with people who want to get rid of Javascript. The problem is reimplementing the entire browser stack, from scratch, on top
by danShumway 7y ago
WASM is fantastic, I have no problem with people who want to get rid of Javascript. The problem is reimplementing the entire browser stack, from scratch, on top of an existing browser. That's the part that's a bad idea.
> Pulling this off was really hard; we’ve basically ended up building a browser inside a browser.
So I played around a bit with Figma. It is notably better than Qt, because the only thing it's using WebGL for is its main canvas. When I saw that comment in the linked article, I assumed Figma would be making most of the same mistakes as Qt.
But all of the menus and site controls are normal HTML, and that helps a lot (although, holy crap learn how to use elements other than divs/spans).
It's not crazy to me that you would have a section of your app that fell back on custom conventions, that's what Canvas was built for. Apps like this explicitly are the use-case. However, there are still tradeoffs from that, and Figma's main canvas suffers from most of the same problems as Qt. The scroll hijacking feels really weird, it's totally inaccessible to screen readers as far as I can tell.
And it's not entirely clear to me why it was built that way. What makes it weird is that as far as I can tell, Figma projects export to HTML/CSS. I don't understand the line of thought that makes a programmer decide to completely reimplement something the browser gives them for free. It's not like they need to support older browsers, they're relying on modern WebGL and WASM. Why wouldn't they want a true WYSIWYG editor?