Skip to content

Commit 14b50ca

Browse files
committed
Some Corrections
Fix javascript-tutorial#2090 - Spelling Mistake Close javascript-tutorial#2079 - Remove 'elem' from `elem.scrollLeft/scrollTop`
1 parent 9f686c9 commit 14b50ca

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

2-ui/1-document/10-size-and-scroll-window/article.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -60,11 +60,11 @@ Why so? Better don't ask. These inconsistencies come from ancient times, not a "
6060
6161
## Get the current scroll [#page-scroll]
6262
63-
DOM elements have their current scroll state in `elem.scrollLeft/scrollTop`.
63+
DOM elements have their current scroll state in their `scrollLeft/scrollTop` properties.
6464
65-
For document scroll `document.documentElement.scrollLeft/Top` works in most browsers, except older WebKit-based ones, like Safari (bug [5991](https://bugs.webkit.org/show_bug.cgi?id=5991)), where we should use `document.body` instead of `document.documentElement`.
65+
For document scroll, `document.documentElement.scrollLeft/Top` works in most browsers, except older WebKit-based ones, like Safari (bug [5991](https://bugs.webkit.org/show_bug.cgi?id=5991)), where we should use `document.body` instead of `document.documentElement`.
6666
67-
Luckily, we don't have to remember these peculiarities at all, because the scroll is available in the special properties `window.pageXOffset/pageYOffset`:
67+
Luckily, we don't have to remember these peculiarities at all, because the scroll is available in the special properties, `window.pageXOffset/pageYOffset`:
6868
6969
```js run
7070
alert('Current scroll from the top: ' + window.pageYOffset);

4-binary/01-arraybuffer-binary-arrays/article.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -235,7 +235,7 @@ let dataView = new DataView(buffer);
235235
// get 8-bit number at offset 0
236236
alert( dataView.getUint8(0) ); // 255
237237

238-
// now get 16-bit number at offset 0, it consists of 2 bytes, together iterpreted as 65535
238+
// now get 16-bit number at offset 0, it consists of 2 bytes, together interpreted as 65535
239239
alert( dataView.getUint16(0) ); // 65535 (biggest 16-bit unsigned int)
240240

241241
// get 32-bit number at offset 0
@@ -244,7 +244,7 @@ alert( dataView.getUint32(0) ); // 4294967295 (biggest 32-bit unsigned int)
244244
dataView.setUint32(0, 0); // set 4-byte number to zero, thus setting all bytes to 0
245245
```
246246

247-
`DataView` is great when we store mixed-format data in the same buffer. E.g we store a sequence of pairs (16-bit integer, 32-bit float). Then `DataView` allows to access them easily.
247+
`DataView` is great when we store mixed-format data in the same buffer. For example, when we store a sequence of pairs (16-bit integer, 32-bit float), `DataView` allows to access them easily.
248248

249249
## Summary
250250

0 commit comments

Comments
 (0)