Chapter 9
Chapter 9, Running Interactive Scripts, is now available! This chapter adds JavaScript to our browser, following up on the theme of the browser as an application platform.
This chapter does not implement a JavaScript engine. The truth is: a JavaScript engine looks a lot like the internals of many other language runtimes, and that’s a whole ‘nother book. Instead, this chapter uses the DukPy package, which binds to a JavaScript interpreter called Duktape. It’s simple, easy to install and connect to our browser, and totally avoids us implementing JavaScript.
Meanwhile, the way JavaScript affects the browser, and vice versa, is interesting, browser-specific, and subtle. It is, honestly, under-appreciated. So I hope after reading this chapter you see the importance of this bit of the browser.
As always, please spread the word if you like what you’re reading, and follow our blog and Twitter. Several of you are also supporting us on Patreon, for which we are truly grateful. We’re working on a page thanking you (and all other contributors) on the book website. Finally, we’ve enabled Github Discussions so that you can discuss the book with other readers and ask questions directly.

