I didn't read the source, but how does this fetch across origins? Presumably the wasm browser gets its networking from the host page's fetch function. But fetch won't return any arbitrary page.
That's what I am trying to build with xanatoo[1][3]. It's however very early, very experimental and not really all that serious of a project, more just trying to play around with what works and what doesn't. Web support is rather limited due to all the Javascript anti-bot challenges, but it does support RSS, Lemmy, Bluesky, Nostr, Gemini, Wikipedia and a bunch of other stuff. Works an Android 5+, Linux and some other systems, has a WASM demo as well[2], not optimized for phone use, but works quite well on a 10" tablet:
Dillo, with dilloc you can write your own scripts (calling external tools and re-rendering the page) and maybe with qjs (quickjs from Bellard) pass away the JS challenges and use tons of websites.
The most trivial use case it's OFC doing what Libredirect does in Chrom* and FFox based browsers (Youtube->Invidious, and so on). Then would call mpv+yt-dlp with a script on every MEDIA link you find.
Also, Medium.com->Scribe.rip, X.com ->> xxcancel.com... just write a small URL plumber replacing "$1" (first argument, the current URL for dilloc) per domain with sed (or an AWK script) and you can do magic (think:curl can take cookies too). Paywalls? Gone. Wayback Classic? A right click in the page -> look up/archive it thanks to a really easy -novice level- script. Wget --mirror --foo --bar a whole homepage or directory? Easy, too.
I'm building a Wasm-based graphical runtime (think GPUI, uses Taffy, etc., for layout and paint, but where every component is Wasm) and this would be a neat way to render web content without having to pull in an OS-level web view.
A few years ago I was trying to write my own HTML+CSS renderer for an email client I was writing, so that I could render HTML emails. I didn't want to embed the entire blink engine for that. This could be one use case for such a browser.
If you check "iframe vs tinybrowser", the use case is that tinybrowser loads, and the iframe does not. At least on my machine. (Maybe a web security thing? I don't understand the details here.)
Well, I want to have a browser available which always uses a proxy (but does not use Tor). So I used https://docs.linuxserver.io/images/docker-firefox/ and it uses 500 MB out of the box. My server has total 64 GB RAM, and... RAM is expensive.
Regarding 'so Playwright and Selenium can drive it.' this can play botting and scraping into hands. So you can use your imagination to use this for good or bad, or think of scenarios where others would use it for either. It also mentions 'agents love tinybrowser', so there's that.
Huh, very cool. Not quite interactive speed, but I guess it's meant for agents, so plenty fast for that?
(Also, lol at the "testimonials"!)
This reminded me, in uni I made a web scraper that ran fully in the browser.
Or it would have, if CORS didn't exist. I had to proxy it thru a 1 line PHP script so requests would be "to the same server". Sekurity achieved.
Of course, web scraping is recursive, so I thought, why not visualize that? So it would extract links from each loaded page, and then fetch those pages too. And then render those websites in nested divs under the original one, and so on. Web-ception!
Original code lost, but I recall it being like 30 LoC or something.
Edit: OK Recreated it from memory but without the recursive scraping bit. So it's just a "normal" browser-in-browser now (lol). Microscopic Python proxy included. https://pastebin.com/AMwCkZai
Let's think this through. Does running a web browser help performance of applications that would otherwise run on ones computer? No. Does putting another browser inside of a browser improve anything inside of a browser? Also no
Hmm, I think the whole browser-in-browser thing is a demo to prove the portability. I believe you can run this as a standalone rust application.
And it might be possible. If the page doesn't load the full V8 engine, renders the DOM in its own way, skips interactivity, I don't see why it may not use less memory. I don't know their approach.
https://www.destroyallsoftware.com/talks/the-birth-and-death...
[1] https://github.com/xanatoo/xanatoo
[2] https://xanatoo.github.io/wasm/ (limited functionality due to CORS)
[3] https://xanatoo.github.io/
The most trivial use case it's OFC doing what Libredirect does in Chrom* and FFox based browsers (Youtube->Invidious, and so on). Then would call mpv+yt-dlp with a script on every MEDIA link you find.
Also, Medium.com->Scribe.rip, X.com ->> xxcancel.com... just write a small URL plumber replacing "$1" (first argument, the current URL for dilloc) per domain with sed (or an AWK script) and you can do magic (think:curl can take cookies too). Paywalls? Gone. Wayback Classic? A right click in the page -> look up/archive it thanks to a really easy -novice level- script. Wget --mirror --foo --bar a whole homepage or directory? Easy, too.
Just noticed that there's a full list of all sorts of tests automated. Pretty cool project overall
Thank you for the laughs
From what I understood, it was specifically created to eliminate the dependency on (headless) browsers, for AI agents.
It does also have an in-browser version, though (i.e. this demo). The two seem to have quite different use cases.
Regarding 'so Playwright and Selenium can drive it.' this can play botting and scraping into hands. So you can use your imagination to use this for good or bad, or think of scenarios where others would use it for either. It also mentions 'agents love tinybrowser', so there's that.
(Also, lol at the "testimonials"!)
This reminded me, in uni I made a web scraper that ran fully in the browser.
Or it would have, if CORS didn't exist. I had to proxy it thru a 1 line PHP script so requests would be "to the same server". Sekurity achieved.
Of course, web scraping is recursive, so I thought, why not visualize that? So it would extract links from each loaded page, and then fetch those pages too. And then render those websites in nested divs under the original one, and so on. Web-ception!
Original code lost, but I recall it being like 30 LoC or something.
Edit: OK Recreated it from memory but without the recursive scraping bit. So it's just a "normal" browser-in-browser now (lol). Microscopic Python proxy included. https://pastebin.com/AMwCkZai
Are there any memory benefits of using this to render a page?
And it might be possible. If the page doesn't load the full V8 engine, renders the DOM in its own way, skips interactivity, I don't see why it may not use less memory. I don't know their approach.