3 ms·
Could this potentially be used in a browser? How complete is “complete”? Browser diversity is top of mind for me...
by Wowfunhappy 6y ago
Could this potentially be used in a browser? How complete is “complete”?
Browser diversity is top of mind for me...
- csande17 6y agoAs far as does this implement enough JavaScript features for websites to run, https://test262.report/ https://test262.report/ looks really promising! You would have to hook it up to DOM and network and all sorts of other APIs normally provided by browsers, though. One reason you might not want to build a general-use browser on QuickJS is performance. QuickJS is one of the fastest JS interpreters in its weight class, but engines like V8 achieve much better runtime speed by using fifty times the code to do all kinds of complicated just-in-time optimizations. Websites built in frameworks like React are often bottlenecked by JS engine performance (spending 100ms or more just doing tons and tons of object instantiations and function calls and stuff), so a QuickJS browser probably wouldn't provide a good experience for those.
- MobiusHorizons 6y agoI believe it could be used. The biggest problem is that all of the DOM classes have to be replicated, and the api surface is absolutely huge, so that would take a large amount of work.
- swiley 6y agoThese individual technologies (DOM/html parser, js runtime, layout etc.) really aren't so bad. It's about a weekends worth of work to do one. What makes a "modern" browser is all of these technologies together not just quirk free, but matching quirks with whatever browser is popular. Even this won't really be enough since most people also depend on a bunch of online services provided by browser vendors at this point (push, bookmark syncing, password management etc.)
- monoideism 6y ago> about a weekends worth of work to do one “layout”, including CSS? Hey, good joke, that’s amusing.
- userbinator 6y agoFrom Fabrice's point of view, it might well be.