@@ -72,13 +72,13 @@ handlers, or have to be touched by the script in some other way. Thus,
7272our script would have to make lots of `querySelector` (or similar)
7373calls in order to find the DOM elements that it needs to act on.
7474
75- (((readability )))(((verbosity )))(((createElement method )))It would be
76- nice if the DOM structure for each part of our interface is defined
77- close to the JavaScript code that drives it. Thus, I've chosen to do
78- all creation of DOM nodes in JavaScript. As we saw in
79- link:13_dom.html#standard[Chapter 13], the built-in interface for
80- building up a DOM structure is horrendously verbose. If we are going
81- to do a lot of DOM construction, we need a helper function.
75+ (((DOM,construction )))(((readability )))(((verbosity )))(((createElement
76+ method)))It would be nice if the DOM structure for each part of our
77+ interface is defined close to the JavaScript code that drives it.
78+ Thus, I've chosen to do all creation of DOM nodes in JavaScript. As we
79+ saw in link:13_dom.html#standard[Chapter 13], the built-in interface
80+ for building up a DOM structure is horrendously verbose. If we are
81+ going to do a lot of DOM construction, we need a helper function.
8282
8383(((elt function)))This function below is an extended version of the
8484`elt` function from link:13_dom.html#elt[Chapter 13]. It creates an
@@ -146,7 +146,7 @@ canvas—it contains the current picture as well as the selected color
146146(in its `fillStyle` property) and brush size (in its `lineWidth`
147147property).
148148
149- (((class (CSS) )))(((CSS)))We wrap the canvas and the controls in
149+ (((class attribute )))(((CSS)))We wrap the canvas and the controls in
150150`<div>` elements with classes to be able to add some styling—for
151151example the grey border around the picture.
152152
0 commit comments