Hacker News new | ask | show | jobs
by morganrallen 4236 days ago
As a proof of concept I knocked up JankyBrowser in about 3 hours. Nagivation? Check. Tabs? Check (how long did other browser take to get those!). All in a little over 6K of JS.

https://gist.github.com/morganrallen/f07f59802884bcdcad4a

4 comments

...wow! This is a really compelling

I know it's really fashionable to hate on javascript, but there's really something to be said for being able to code a web browser with tools you can learn on Khan Academy.

"var webview = document.createElement("webview");"

Turns out, it's pretty easy to code a web browser in ANYTHING if one of the primitives you can instantiate is A WEB BROWSER...

al2o3cr, actually no. There are a load of difficult implementations needed to achieve even the most basic webbrowser, even when building on top of the already great chromium content lib. For instance, Thrust's predecessor ExoBrowser failed where Thrust is succeeding, thankfully we have progressed to a state of composability where we can take the work of others before and compose it into something useable for the world. The 500 something commits to Thrust were no simple feat, and their are many more to come.
The only browser that fits in a gist!
Here, a browser that fits in a .bat file:

    @echo off
    "C:\Program Files\Internet Explorer\iexplore.exe"
Only this one is not designed by you...
hehe, browser
Cookies are handled by Chromium, I suppose?

Or are they completely ignored?

My god. I'm just awestruck, I just ran it and it worked beautifully.

The same thing in Java Swing took me 3 weeks 4 years ago.

Thanks! Not too bad for a couple hours on a sick day.