3 ms·
This looks awesome. About 15 years ago, I started working on a headless browser and maintained it for several years. It used SpiderMonkey as the js interpreter
by jm4 2y ago
This looks awesome. About 15 years ago, I started working on a headless browser and maintained it for several years. It used SpiderMonkey as the js interpreter and had a custom DOM implementation. It ran all the modern js from the time, AJAX, etc. Later, I added a custom Flash runtime. It basically did everything but draw to the screen. That project was a lot of fun.
I'm definitely interested in going through this book.
- aitchnyu 2y agoUmm, if you wanted/want to draw to the screen, what library will you use?
- skeeterbug 2y agoI believe Chrome uses Skia
- lesuorac 2y agoYes [4]. > [1] The library is used as of 2023 in Google Chrome, ChromeOS, ChromiumOS, Mozilla Firefox, Mozilla Thunderbird, Android, Firefox OS, Flutter,[5] Avalonia (from Alpha 4), LibreOffice (from version 7.0) and RAD Studio[6](since version 12.0). > [2] Changes to the Skia repository will be rolled into Chromium by the AutoRoll bot several times per day. > [3] It serves as the graphics engine for Google Chrome and ChromeOS, Android, Flutter, and many other products. [1]: https://en.wikipedia.org/wiki/Skia_Graphics_Engine https://en.wikipedia.org/wiki/Skia_Graphics_Engine [2]: https://skia.org/docs/dev/chrome/ https://skia.org/docs/dev/chrome/ [3]: https://skia.org/ https://skia.org/ [4]: https://github.com/chromium/chromium/tree/main/skia https://github.com/chromium/chromium/tree/main/skia
- pmarreck 2y agoWhoa. Somehow I have not heard of this. Can this be used to make cross-platform GUI apps?
- Rohansi 2y agoSure you can, it's a 2D graphics library. It's more like the JS Canvas API though instead of a UI framework.
- PaulDavisThe1st 2y agoWhich rather importantly means that you still need to find something else to do: * layout * event handling which are not exactly trivial for a "real" application (whatever that means).
- mnutt 2y agoAs of 2024, WebKit's Linux ports (GTK and WPE) are switching to Skia too. [0] Prior to that, they used cairo. [0]: https://blogs.igalia.com/carlosgc/2024/02/19/webkit-switching-to-skia-for-2d-graphics-rendering/ https://blogs.igalia.com/carlosgc/2024/02/19/webkit-switchin...
- pavpanchekha 2y agoThe book uses Tk (via Python's tkinter library) for the first 10 chapters and then switches to Skia, which is used by maybe all of the browsers now (I believe Webkit on Linux just switched to it from Cairo). It seems to be by far the most common high-performance 2D graphics library.
- jm4 2y agoI didn’t have a clue. That wasn’t part of my skillset. All we needed was a headless browser that was automated. It was crawling a few million pages a day. I had a debug console where I could see cached pages, headers, cookies, etc.