Skip to content

Commit 7b42ecc

Browse files
committed
minor fixes
1 parent ef2760e commit 7b42ecc

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

2-ui/1-document/01-browser-environment/article.md

+5-7
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@
22

33
The JavaScript language was initially created for web browsers. Since then it has evolved and become a language with many uses and platforms.
44

5-
A platform may be a browser, or a web-server or another *host*, even a coffee machine. Each of them provides platform-specific functionality. The JavaScript specification calls that a *host environment*.
5+
A platform may be a browser, or a web-server or another *host*, even a "smart" coffee machine, if it can run JavaScript. Each of them provides platform-specific functionality. The JavaScript specification calls that a *host environment*.
66

77
A host environment provides own objects and functions additional to the language core. Web browsers give a means to control web pages. Node.js provides server-side features, and so on.
88

9-
Here's a bird's-eye view of what we have when JavaScript runs in a web-browser:
9+
Here's a bird's-eye view of what we have when JavaScript runs in a web browser:
1010

1111
![](windowObjects.svg)
1212

@@ -49,9 +49,7 @@ document.body.style.background = "red";
4949
setTimeout(() => document.body.style.background = "", 1000);
5050
```
5151

52-
Here we used `document.body.style`, but there's much, much more. Properties and methods are described in the specification:
53-
54-
- **DOM Living Standard** at <https://dom.spec.whatwg.org>
52+
Here we used `document.body.style`, but there's much, much more. Properties and methods are described in the specification: **DOM Living Standard** at <https://dom.spec.whatwg.org>.
5553

5654
```smart header="DOM is not only for browsers"
5755
The DOM specification explains the structure of a document and provides objects to manipulate it. There are non-browser instruments that use DOM too.
@@ -60,9 +58,9 @@ For instance, server-side scripts that download HTML pages and process them can
6058
```
6159

6260
```smart header="CSSOM for styling"
63-
CSS rules and stylesheets are structured in a different way than HTML. There's a separate specification, [CSS Object Model (CSSOM)](https://www.w3.org/TR/cssom-1/), that explains how they are represented as objects, and how to read and write them.
61+
There's also a separate specification, [CSS Object Model (CSSOM)](https://www.w3.org/TR/cssom-1/) for CSS rules and stylesheets, that explains how they are represented as objects, and how to read and write them.
6462
65-
CSSOM is used together with DOM when we modify style rules for the document. In practice though, CSSOM is rarely required, because usually CSS rules are static. We rarely need to add/remove CSS rules from JavaScript, but that's also possible.
63+
CSSOM is used together with DOM when we modify style rules for the document. In practice though, CSSOM is rarely required, because we rarely need to modify CSS rules from JavaScript (usually we just add/remove CSS classes, not modify their CSS rules), but that's also possible.
6664
```
6765

6866
## BOM (Browser Object Model)

0 commit comments

Comments
 (0)