Skip to content

Commit ed8eeac

Browse files
committed
A sequence diagram.
1 parent 303ae52 commit ed8eeac

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

docs/exercise1b.md

+15
Original file line numberDiff line numberDiff line change
@@ -90,3 +90,18 @@ another object, and we're calling one of the canvas' functions.
9090
Good question! That means that our class `Renderer` is a special type of
9191
a different class called `HTMLParser` which happens to be provided by one
9292
of the libraries we're using.
93+
94+
### What's the difference between the renderer and browser?
95+
96+
The `Browser` class is responsible for loading pages on the network. The
97+
`Renderer` class is responsible for drawing them on the screen. The two
98+
classes interact in both directions, like this:
99+
100+
```mermaid
101+
sequenceDiagram
102+
browser(Browser class)
103+
renderer(Renderer class)
104+
browser->renderer: Please draw the following HTML
105+
renderer->brower: User clicked a link, please load it
106+
browser->renderer: Please draw the following HTML for the new page
107+
```

0 commit comments

Comments
 (0)