Skip to content

Commit bdda1af

Browse files
committed
minor
1 parent 7f1d5de commit bdda1af

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

1-js/02-first-steps/01-hello-world/article.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Hello, world!
22

3-
The tutorial that you're reading is about core JavaScript, which is platform-independent. Later on, you'll learn about Node.js and other platforms that use it.
3+
This part of the tutorial is about core JavaScript, the language itself. Later on, you'll learn about Node.js and other platforms that use it.
44

55
But we need a working environment to run our scripts and, since this book is online, the browser is a good choice. We'll keep the amount of browser-specific commands (like `alert`) to a minimum so that you don't spend time on them if you plan to concentrate on another environment (like Node.js). We'll focus on JavaScript in the browser in the [next part](/ui) of the tutorial.
66

@@ -46,7 +46,7 @@ The `<script>` tag contains JavaScript code which is automatically executed when
4646
The `<script>` tag has a few attributes that are rarely used nowadays but can still be found in old code:
4747

4848
The `type` attribute: <code>&lt;script <u>type</u>=...&gt;</code>
49-
: The old HTML standard, HTML4, required a script to have a `type`. Usually it was `type="text/javascript"`. It's not required anymore. Also, the modern HTML standard, HTML5, totally changed the meaning of this attribute. Now, it can be used for JavaScript modules. But that's an advanced topic; we'll talk about modules in another part of the tutorial.
49+
: The old HTML standard, HTML4, required a script to have a `type`. Usually it was `type="text/javascript"`. It's not required anymore. Also, the modern HTML standard, HTML5, totally changed the meaning of this attribute. Now, it can be used for JavaScript modules. But that's an advanced topic; we'll talk about modules in another part of the tutorial.
5050

5151
The `language` attribute: <code>&lt;script <u>language</u>=...&gt;</code>
5252
: This attribute was meant to show the language of the script. This attribute no longer makes sense because JavaScript is the default language. There is no need to use it.

2-ui/5-loading/01-onload-ondomcontentloaded/article.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,13 @@
33
The lifecycle of an HTML page has three important events:
44

55
- `DOMContentLoaded` -- the browser fully loaded HTML, and the DOM tree is built, but external resources like pictures `<img>` and stylesheets may be not yet loaded.
6-
- `load` -- the browser loaded all resources (images, styles etc).
7-
- `beforeunload/unload` -- when the user is leaving the page.
6+
- `load` -- not onyl HTML is loaded, but also all the external resources: images, styles etc.
7+
- `beforeunload/unload` -- the user is leaving the page.
88

99
Each event may be useful:
1010

1111
- `DOMContentLoaded` event -- DOM is ready, so the handler can lookup DOM nodes, initialize the interface.
12-
- `load` event -- additional resources are loaded, we can get image sizes (if not specified in HTML/CSS) etc.
12+
- `load` event -- external resources are loaded, so styles are applied, image sizes are known etc.
1313
- `beforeunload` event -- the user is leaving: we can check if the user saved the changes and ask them whether they really want to leave.
1414
- `unload` -- the user almost left, but we still can initiate some operations, such as sending out statistics.
1515

0 commit comments

Comments
 (0)