Merge pull request #795 from weswhite/master
added us so the sentence makes sense
This commit is contained in:
commit
6de8c3c9ff
2 changed files with 6 additions and 6 deletions
|
@ -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.**
|
||||
|
||||
|
|
|
@ -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:
|
||||
|
||||

|
||||
|
||||
|
@ -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
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue