Skip to content

Commit fe568da

Browse files
committed
Add index terms to Chapter 17
1 parent 2dc6bad commit fe568da

9 files changed

Lines changed: 480 additions & 413 deletions

File tree

02_program_structure.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -358,7 +358,7 @@ alert("Your number is the square root of " +
358358
----
359359

360360
(((type conversion)))(((Number function)))(((String
361-
function)))(((Boolean function))))(((Boolean type,conversion to)))The
361+
function)))(((Boolean function)))(((Boolean type,conversion to)))The
362362
function `Number` converts a value to a number. We need that
363363
conversion because the result of `prompt` is a string value, and we
364364
want a number. There are similar functions called `String` and

08_error.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -524,7 +524,7 @@ Even though the function called from `withContext` exploded,
524524

525525
== Selective catching ==
526526

527-
(((unhandled exception)))(((exception handling)))(((JavaScript
527+
(((uncaught exception)))(((exception handling)))(((JavaScript
528528
console)))(((developer tools)))(((call stack)))(((error)))When an
529529
exception makes it all the way to the bottom of the stack without
530530
being caught, it gets handled by the environment. What this means

10_modules.txt

Lines changed: 12 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -312,16 +312,13 @@ problems mentioned above, and has the added benefit of making you program's
312312
dependencies explicit, making it harder to accidentally make use of
313313
some module without stating that you need it.
314314

315-
For `require` we need two things. First, we want
316-
a function `readFile`,
317-
which returns the content of a given file as a string.
318-
(A single such function is not present in standard JavaScript,
319-
but different JavaScript environments, such as the browser and Node.js,
320-
provide their own ways of accessing files.
321-
For now, let's just pretend we have this simple function.)
322-
Secondly, we need to be able
323-
to actually execute this string as JavaScript
324-
code.
315+
(((readFile function)))For `require` we need two things. First, we
316+
want a function `readFile`, which returns the content of a given file
317+
as a string. (A single such function is not present in standard
318+
JavaScript, but different JavaScript environments, such as the browser
319+
and Node.js, provide their own ways of accessing files. For now, let's
320+
just pretend we have this simple function.) Secondly, we need to be
321+
able to actually execute this string as JavaScript code.
325322

326323
[[eval]]
327324
== Evaluating data as code ==
@@ -528,10 +525,11 @@ define([], function() {
528525
});
529526
----
530527

531-
In order to be able to show a minimal implementation of `define`, we will
532-
pretend we have a `backgroundReadFile` function, which takes a file
533-
name and a function, and will call the function with the content of
534-
the file as soon as it has finished loading it. (link:17_http.html#getURL[Chapter 17] will
528+
(((backgroundReadFile function)))In order to be able to show a minimal
529+
implementation of `define`, we will pretend we have a
530+
`backgroundReadFile` function, which takes a file name and a function,
531+
and will call the function with the content of the file as soon as it
532+
has finished loading it. (link:17_http.html#getURL[Chapter 17] will
535533
explain how to write that function.)
536534

537535
For the purpose of keeping track of modules while they are being

12_browser.txt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,8 +100,10 @@ browser. The “Web” part in the name refers to the fact that such pages
100100
can easily link to each other, thus connecting into a huge mesh that
101101
users can move through.
102102

103+
indexsee::[Hyper-Text Transfer Prototol,HTTP]
104+
103105
To add content to the Web, all you need to do is connect a machine
104-
to the Internet, and have it listen on port 80, using HTTP (the
106+
to the Internet, and have it listen on port 80, using ((HTTP)) (the
105107
_Hyper-Text Transfer Protocol_). This protocol allows other computers
106108
to request documents over the network.
107109

13_dom.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,8 @@ This page has the following structure:
4343

4444
image::img/html-boxes.svg[alt="HTML document as nested boxes",width="7cm"]
4545

46+
indexsee::[Document Object Model,DOM]
47+
4648
The data structure the browser uses to represent the document follows
4749
this shape. For each box, there is an object, which we can interact
4850
with to find out things like what HTML tag it represents, and which

16_canvas.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1128,7 +1128,7 @@ draw text, but won't help with positioning that text, or wrapping it
11281128
when it takes up more than one line. In an HTML-based picture, it is
11291129
very easy to include blocks of text.
11301130

1131-
(((zooming)))((SVG)) can be used to produce ((crisp)) ((graphics))
1131+
(((zooming)))(((SVG)))SVG can be used to produce ((crisp)) ((graphics))
11321132
that look good at any zoom level. It is more difficult to use than
11331133
plain HTML, but also much more powerful.
11341134

0 commit comments

Comments
 (0)