Skip to content

Commit 3c3dbb7

Browse files
Shawn Erquhartmarijnh
authored andcommitted
fixed a few typos
1 parent 5e84c12 commit 3c3dbb7

File tree

2 files changed

+18
-19
lines changed

2 files changed

+18
-19
lines changed

17_http.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -747,7 +747,7 @@ of all the error handing ourselves.
747747
(((client)))(((HTTP)))When building a system that requires
748748
((communication)) between a JavaScript program running in the
749749
((browser)) (client-side) and a program on a ((server)) (server-side),
750-
there several different ways to model this communication.
750+
there are several different ways to model this communication.
751751

752752
(((network)))(((abstraction)))A commonly used model is that of
753753
_((remote procedure call))s_. In this model, communication follows the
@@ -781,7 +781,7 @@ since resources are easier to reason about than a jumble of functions.
781781
the internet tends to follow a long, dangerous road. In order to get
782782
to its destination it must hop through anything from coffee shop wifi
783783
((network))s to networks controlled by various companies and states.
784-
At any point along its routed, it may be inspected, or even modified.
784+
At any point along its route it may be inspected or even modified.
785785

786786
(((tampering)))If it is important that something remain secret,
787787
such as the ((password)) to your ((email)) account, or that it arrive
@@ -868,7 +868,7 @@ the standardized _media types_ `text/plain`, `text/html`, and
868868

869869
(((setRequestHeader method)))(((XMLHttpRequest)))Send requests to
870870
fetch all three formats of this resource. Use the `setRequestHeader`
871-
method of your `XMLHttpRequest` object set the header named `Accept`
871+
method of your `XMLHttpRequest` object to set the header named `Accept`
872872
to one of the media types given above. Make sure you set the header
873873
_after_ calling `open`, but before calling `send`.
874874

18_forms.txt

Lines changed: 15 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@
88
[chapterquote="true"]
99
[quote,Mephistopheles,in Goethe's Faust]
1010
____
11-
I shall this very day, at Doctor's feast, +
12-
My bounden service duly pay thee. +
13-
But one thing!—For insurance’ sake, I pray thee, +
11+
I shall this very day, at Doctor's feast, +
12+
My bounden service duly pay thee. +
13+
But one thing!—For insurance’ sake, I pray thee, +
1414
Grant me a line or two, at least.
1515
____
1616

@@ -22,17 +22,16 @@ designed for a pre-JavaScript Web, assuming that interaction with the
2222
server always happens by navigating to a new page.
2323

2424
But their elements are part of the ((DOM)) like the rest of the page,
25-
and the DOM elements that represent form ((field))s supports a number
25+
and the DOM elements that represent form ((field))s support a number
2626
of properties and events that are not present on other elements. These
27-
make it possible to inspect and control them with JavaScript programs.
28-
This makes it possible to add additional functionality to a
29-
traditional form, or to use forms and fields as building blocks in a
30-
JavaScript application.
27+
make it possible to inspect and control them with JavaScript programs by
28+
adding additional functionality to a traditional form or by using forms
29+
and fields as building blocks in a JavaScript application.
3130

3231
== Fields ==
3332

3433
(((form (HTML tag))))A web form consists of any number of input
35-
((field))s, grouped in a `<form>` tag. HTML allows a number of
34+
((field))s grouped in a `<form>` tag. HTML allows a number of
3635
different styles of fields, ranging from simple on/off checkboxes to
3736
drop-down menus and fields for text input. This book won't try to
3837
comprehensively discuss all of them, but we will start with a rough
@@ -205,8 +204,8 @@ endif::book_target[]
205204

206205
(((user experience)))(((asynchronous programming)))When the program is
207206
busy processing the action caused by some ((button)) or other control,
208-
for example making requests to a server, it can be a good idea to
209-
disable the control until the action finishes, so that when the user
207+
(for example, making requests to a server), it can be a good idea to
208+
disable the control until the action finishes so that, when the user
210209
gets impatient and clicks it again, they don't accidentally repeat
211210
their action.
212211

@@ -223,7 +222,7 @@ inside of it.
223222
form field determines the way its value will be identified when the
224223
form is ((submit))ted. It can also be used as a property name when
225224
accessing the form's `elements` property, which acts both as an
226-
array-like object (accessible by number) and a ((map)) (accessable by
225+
array-like object (accessible by number) and a ((map)) (accessible by
227226
name).
228227

229228
[source,text/html]
@@ -278,7 +277,7 @@ calling `preventDefault` on the event object.
278277
verify that the values the user entered make sense, and immediately
279278
show an error message instead of submitting the form when they don't.
280279
Or we can disable the regular way of submitting the form entirely, as
281-
in the example above, and have out program handle the input, possibly
280+
in the example above, and have our program handle the input, possibly
282281
using `XMLHttpRequest` to send it over to a server without reloading
283282
the page.
284283

@@ -605,7 +604,7 @@ so-called _blob_ object) to the file reader.
605604
== Storing data client-side ==
606605

607606
(((web application)))Simple ((HTML)) pages with a bit of JavaScript
608-
can be a great medium for “((mini application))”—small helper programs
607+
can be a great medium for “((mini applications))”—small helper programs
609608
that automate everyday things. By connecting a few form ((field))s
610609
with event handlers you can do anything from converting between
611610
degrees Celsius and Fahrenheit to computing passwords from a master
@@ -615,7 +614,7 @@ password and a website name.
615614
remember something between sessions, you can not use JavaScript
616615
((variable))s, since those are thrown away every time a page is
617616
closed. You could set up a server, connect it to the Internet, and
618-
have your appplication store something there. We will see how to do
617+
have your application store something there. We will see how to do
619618
that in link:20_node.html#node[Chapter 20]. But this adds a lot of
620619
extra work and complexity. Sometimes it is enough to just keep the
621620
data in the ((browser)). But how?
@@ -753,7 +752,7 @@ buttons) are used to read or set the field's content.
753752

754753
When a form is submitted, its `"submit"` event fires. A JavaScript
755754
handler can `preventDefault` that event to prevent the submission from
756-
happening. Form fields elements do not have to be wrapped in `<form>`
755+
happening. Form field elements do not have to be wrapped in `<form>`
757756
tag.
758757

759758
When the user has selected a field from their local file system in a

0 commit comments

Comments
 (0)