diff --git a/2-ui/1-document/02-dom-nodes/article.md b/2-ui/1-document/02-dom-nodes/article.md index a701fb0c..6bb34ff8 100644 --- a/2-ui/1-document/02-dom-nodes/article.md +++ b/2-ui/1-document/02-dom-nodes/article.md @@ -176,7 +176,7 @@ drawHtmlTree(node6, 'div.domtree', 690, 500); Here we see a new tree node type -- *comment node*, labeled as `#comment`. -We may think -- why a comment is added to the DOM? It doesn't affect the visual representation in any way. But there's a rule -- if something's in HTML, then it also must be in the DOM tree. +We may think -- why is a comment added to the DOM? It doesn't affect the visual representation in any way. But there's a rule -- if something's in HTML, then it also must be in the DOM tree. **Everything in HTML, even comments, becomes a part of the DOM.** diff --git a/2-ui/1-document/03-dom-navigation/article.md b/2-ui/1-document/03-dom-navigation/article.md index 976e595a..f19b3307 100644 --- a/2-ui/1-document/03-dom-navigation/article.md +++ b/2-ui/1-document/03-dom-navigation/article.md @@ -7,11 +7,11 @@ libs: # Walking the DOM -The DOM allows to do anything with elements and their contents, but first we need to reach the corresponding DOM object, get it into a variable, and then we are able to modify it. +The DOM allows us to do anything with elements and their contents, but first we need to reach the corresponding DOM object, get it into a variable, and then we are able to modify it. All operations on the DOM start with the `document` object. From it we can access any node. -Here's a picture of links that allow to travel between DOM nodes: +Here's a picture of links that allow for travel between DOM nodes: ![](dom-links.png) @@ -155,9 +155,9 @@ The first thing is nice. The second is tolerable, because we can use `Array.from ```warn header="DOM collections are read-only" DOM collections, and even more -- *all* navigation properties listed in this chapter are read-only. -We can't replace a child by something else assigning `childNodes[i] = ...`. +We can't replace a child by something else by assigning `childNodes[i] = ...`. -Changing DOM needs other methods, we'll see them in the next chapter. +Changing DOM needs other methods. We will see them in the next chapter. ``` ```warn header="DOM collections are live" @@ -309,7 +309,7 @@ An example of usage: The specification: [tabular data](https://html.spec.whatwg.org/multipage/tables.html). -There are also additional navigation properties for HTML forms. We'll look at them later when start working with forms. +There are also additional navigation properties for HTML forms. We'll look at them later when we start working with forms. # Summary