Giter VIP home page Giter VIP logo

browser_engineering_book's Introduction

Web Browser Engineering

This is the source code to Web Browser Engineering, my book on how web browsers work. The best way to read the book is online.

Building the book

If you want to build from source, run:

make book draft blog

The source code contains:

  • The Markdown source for the book text, in book/
  • A template and code for converting the book to HTML, in infra/
  • Chapter-by-chapter implementations of the browser, in src/
  • Styling for the book's website, in www/
  • The book's built-in feedback system, in www/, including JavaScript and the Python backend.

We prefer to receive typos and small comments on the text using the book's built-in feedback tools, which you can enable with Ctrl+E.

You can run the book's built-in checks with:

make lint

We're always happy to hear from readers and from educators who want to use the book. Please email us!

Running the browser

Code for the browser developed in the book can be found in src/, in files named lab1.py, lab2.py, and so on, corresponding to each chapter.

To run it, you'll need to install:

  • A recent Python 3; version 3.9.10is known to work, but older versions probably will too.
  • The tkinter package, part of the Python standard library but often isn't included in pre-installed Pythons on macOS and Linux. You can check by running python3 -m tkinter, which should open a test window.
  • For Chapter 9+, the dukpy package. Consult that chapter for installation instructions.
  • For Chapter 11+, the skia and pysdl2 packages. Consult that chapter for installation instructions.

Once you have the above, you can run, say, the browser as of the end of Chapter 3 like so:

cd src/
python3 lab3.py https://browser.engineering

Every chapter can be run in a similar fashion.

For chapters 8 onward, there's also a "guest book" web application, which you can run with:

cd src/
python3 server8.py

Like the browser, there are different versions of the server for different chapters, named server8.py, server9.py, and so on.

You can also run the book's unit tests with:

make test

browser_engineering_book's People

Contributors

chrishtr avatar pavpanchekha avatar dependabot[bot] avatar jerrykuch avatar shuhei avatar morinokami avatar abrhim avatar supercilex avatar anthony-geoghegan avatar ianbriggs avatar wilcoxjay avatar paulinenemchak avatar paganiniana avatar mixed avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.